![]() |
Update User Titles and Ranks
As posted Here
As a cron job? i have members coming in and out of subscribed member groups. Once the subscribe, they join the "premium" usergroup. When this expires, i require the rank to be removed. I have set the rank to be if = to this usergroup, but so far, the only way to do it is to run the update user ranks and titles in maintenance. how would i run a cron to do this when my subscription cron runs? |
Anyone please?
|
I guess for the right code, i could even cough up some paypal for the right person....
I'm struggling with this one. :/ |
setup a cron for this... admincp/misc.php?do=updateuser
PHP Code:
|
I'm actually in 3.5.5 - but that may give me a start ;)
|
i'm thinking it should work fine for 3.5.5... just create a new php file and place it into your includes/cron directory and runwith your cron setup.
|
Can you please explain this a little more in depth? I am trying to do this as well on my forum and need some help. I need to update user titles and ranks that have been changed but not ALL users, only users who have made changes etc.
Any help GearTripper? Thanks a ton. |
Has anyone else figured out how to make this work? I keep getting an error trying to run this on 3.6.5.
The error is: Warning: include_once(/home/user/public_html/./admincp/misc.php?do=updateuser) [function.include-once]: failed to open stream: No such file or directory in /admincp/cronadmin.php on line 108 Warning: include_once() [function.include]: Failed opening '/home/user/public_html/./admincp/misc.php?do=updateuser' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /admincp/cronadmin.php on line 108 Really trying to find a way to automate via the scheduler running the update user title and rank counter every night. Could anyone please help? THANK YOU. |
I don't quite understand what SCRIPT3R was suggesting, but it seems like if you're going to put that code in a separate php file in the includes/cron directory, then you might as well take out the if ($_REQUEST['do'] == 'updateuser') (and the associate curly braces) and then take the "?do=updateuser" off the name of the file (you probably also would want to name it something more meaningful than "misc.php").
Also, I'm not sure but I think you may have to edit that code some - it looks like maybe SCRIPT3R was just showing which code to use from the admincp code, but it looks like it might have trouble running as a cron job the way it is. |
All times are GMT. The time now is 09:34 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|