Record the time that they logged in.
If the current time comes after the recorded time (e.g., the user logged in at 2 p.m. on 1 January 2013; the current time is 5 p.m. on 5 August 2013), check if their most recent post was made after that time today (i.e., 2 p.m. on 5 August 2013). If so, forbid the new post.
If the current time comes before the recorded time (e.g., the user logged in at 2 p.m. on 1 January 2013; the current time is 1 p.m. on 5 August 2013), check if their most recent post was made after that time yesterday (i.e., 2 p.m. on 4 August 2013). If so, forbid the new post.
Otherwise, allow the new post.
I wonder if you actually mean sign up rather than login since a user can circumvent this system just by logging out and then logging back in to reset the login time.