We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: Convert users after time period

Development and Programming

Chris Newton's avatar
Chris Newton
440 posts
16 years ago
Chris Newton's avatar Chris Newton

I created a plugin that will convert a user from one group to another, if that user is older than a specified amount of time. This looks at the user’s creation date, and converts them X seconds from the time they were created.

Caveats: 1. This won’t allow you to convert to or from super admin status. 2. This doesn’t account for server time offset, so 86400 seconds might be more or less than one day, by a few hours (or whatever your server offset is)

Example usage: {exp:convert_users_after_time_period convert_from="6" convert_to="3" seconds="86400"}

Basically, I wanted to expire users after 24 hours. This plugin can be used for that purpose, or to create a testing or waiting period for a user. Use this by either adding the plugin to a page and hitting that page with CRON (more often than your seconds to conversion), or put it on a highly trafficked page so it gets hit pretty often.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.