Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a website working with a user registration/login system all working also.

I wish to automatically send all users an email that have not used their account for 6 months. I have an idea, but just wondered if there would be a better/more convenient solution.

Because this will be done in PHP, I guess this requires a cron job, which isnt a problem as I have done many of them before. Wordpress just doesnt seem to store the last time a user visits my site (to my knowledge). I then thought I could just store in the database (manually) the last time a user visits the site, and run a comparison to the current date in a PHP cron file.

Has anyone got a better suggestion? Or even a plugin to do it for me :p

Thanks!

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Take a look at the Transients API. It's meant to store data temporary. Note, that this doesn't replace a cron job, as it needs "Action" on the site. So if the site isn't requested, where you set/alter/delete a Transient, then nothing happens.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.