The Arcive of vBulletin Modifications Site. |
|
Force update of profile Details »»
|
|||||||||||||||||||||||||
I have added some new required custom profile fields that I want our users to fill in so we have more accurate information about our members.
What I would like to do is force all members to update their profile before being able to view index.php. Or alternatively a pop-up window appears when they come to the boards requesting them to update their profile, and when it's updated, then the pop-up no longer appears. I've tried a variety of options, including adding an additional no_permission in functions.php but I'm not really making any headway so would appreciate any help! Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
By update you mean you want all fields to be fill with info, or just want your users to go and see the new fields?
|
|
#3
|
|||
|
|||
|
No, I actually want them to fill in the new fields.
So for example, there is a Gender field (M or F). When a member comes to the forum, I want Forum Home to query the database to check whether that Gender field has been completed, and if not, either to display a message (pop-up or on screen) asking them to update their profile or to redirect them to Edit Profile. |
|
#4
|
|||
|
|||
|
OK, what I have so far is:
Code:
if ($userfield[required]=="") {
eval("standarderror(\"".gettemplate('error_updateprofile')."\");");
}
|
|
#5
|
||||
|
||||
|
Let's say field5 and field6 are required:
Code:
if (trim($bbuserinfo['field5']) == '' or trim($bbuserinfo['field6']) == '') {
eval("standarderror(\"".gettemplate('error_updateprofile')."\");");
}
|
|
#6
|
|||
|
|||
|
Brilliant! That's the one!
Thanks very much! |
![]() |
|
|