The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Schedualed Task to set user options
Hi
I'm wondering if anyone knows how I can setup a scheduled task to set / reset user options that an admin might see in the control panel for a user. Items like "Receive Admin Email, Invisible Mode etc" I'd also like to do this on a user group basis. That is set everyone's Invisible Mode in the Registered users group to yes or no. Anyone able to help? |
#2
|
||||
|
||||
You can do some of these things through the Execute SQL Query page - queries.php - so I would grab the queries from there and then put them in their own page and just run the script as a Scheduled Task.
|
#3
|
|||
|
|||
I took a look at the queries.php page but its a little beyond me. Are you able to help pull out what I need and develop the script?
|
#4
|
|||
|
|||
Anyone able to help me parse this queries.php page and construct the script needed for this scheduled task? I really need this to work so that the LDAP mod that I installed works properly but I don't understand the code on this page or scheduled tasks well enough to accomplish this on my own.
Any help would be greatly appreciated! |
#5
|
||||
|
||||
I recall looking at the queries.php page back when you first posted and it didn't look like a fun task to figure out. Is there some reason you don't want to set these options for your users when they first register? It seems like that would be much easier. If you are already writing to the database with their username/password/etc, why not just write these other settings. Or, after they register and on the Thank You for Registering screen, why not direct them to their User CP to pick their options?
|
#6
|
|||
|
|||
umm well the current LDAP mod creates the user directly in the db so it bypasses the default settings with regards to new users etc within vB.
below is the code that the LDAP mod uses to create the new user....just not sure how to add to it so that it creates the new users similar to the way the default settings would within vB. PHP Code:
|
#7
|
||||
|
||||
Looking through the registration.php page and then looking for where the defaults get set, I see that class_dm_user.php gets used to set the registration defaults. Perhaps look into calling this page (in the includes directory) and using the function set_registration_defaults will help you out. That function, however, is included in "class vB_DataManager_User extends vB_DataManager". So, you might want to look into using the datamanager to include this.
edit: This article may help you out: Add new Users (automatically) |
#8
|
|||
|
|||
Thanks Lynne. That link was exactly what I needed
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|