The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
(mysql) Resetting a custom profile field if user is not online (via cron)
I know, this is a very strange request for help.
I need some help putting this all together... I know the time stamp for whoseonline: PHP Code:
The profile field is in userfield.field10 field10 is a drop downbox. There are only 3 vaules: 1. null 2. Closed 3. Open What I want to do is IF the user has field10 set to "Open", change it to "Closed" if they are not currently active. This will be done via a cron job every 45 minutes. The most efficent way would be: Check the database for user ids (userfield.userid) who has field10 set to "Open". Then check to see if those users are online(by comparing $datecut with user.lastactivity). If they are not, set field10 to "Closed" Anybody up to helping a mysql dummy out? Edit: I know how to query the database for a list of userids that have field10 set to closed... PHP Code:
PHP Code:
As you can see, I am lost (but trying) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|