FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Adding to the user registration process
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Adding to the user registration process [message #6265] Mon, 07 October 2002 01:06 Go to next message
alphageek is currently offline  alphageek   United States
Messages: 7
Registered: October 2002
Karma: 0
Junior Member
I've done some code diving, and I will continue to do so, but any tips or pointers would be appreciated. What I want to do is add a required field to the registration page, and then when the form is submitted, I want to validate the value of that field against another table in the database. If it does not validate, I don't want to process the registration -- i.e., they won't be able to register for the forum.

TIA,

Dave
Re: Adding to the user registration process [message #6266 is a reply to message #6265] Mon, 07 October 2002 01:27 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Take a look at how this is done for other required options such as email,login and password.

FUDforum Core Developer
Re: Adding to the user registration process [message #6267 is a reply to message #6266] Mon, 07 October 2002 01:34 Go to previous messageGo to next message
alphageek is currently offline  alphageek   United States
Messages: 7
Registered: October 2002
Karma: 0
Junior Member
What file would I find these routines in?

TIA,

Dave
Re: Adding to the user registration process [message #6276 is a reply to message #6267] Mon, 07 October 2002 14:09 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
register.php.t, which can be found inside the src/ directory

FUDforum Core Developer
icon14.gif  Re: Adding to the user registration process [message #6374 is a reply to message #6276] Wed, 09 October 2002 02:12 Go to previous messageGo to next message
alphageek is currently offline  alphageek   United States
Messages: 7
Registered: October 2002
Karma: 0
Junior Member
Ok, I've found the register_form_check function that appears to be what does the check for required fields.

Is there any way from the admin area to add a custom field to a user profile like VBulletin, or do I need to hack on the source for that? I'd really hate to do that, 'cause it'll make updates harder.

Once I've made the changes to register.php.t, I assume I have to rebuild my theme for those to take effect.

BTW, Thanks for the help. I don't mind code diving, but pointers like you've given are very helpful to me Smile

Dave
Re: Adding to the user registration process [message #6387 is a reply to message #6374] Wed, 09 October 2002 13:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Hacking up the source is what you'll need to do I'm afraid.

FUDforum Core Developer
icon3.gif  Re: Adding to the user registration process [message #6421 is a reply to message #6387] Thu, 10 October 2002 08:00 Go to previous messageGo to next message
alphageek is currently offline  alphageek   United States
Messages: 7
Registered: October 2002
Karma: 0
Junior Member
I'm almost there Prottoss, thanks your all your help. I've got my routines in the correct place to do the validation of the extra information, and I've verified that by having the validation routine print out HTML comments with the results of my checks.

What's not happening is having any of the error messages show up. For example, here's one of the check lines:

if( empty($this->memnum) ) set_err('reg_membernum', '{TEMPLATE: register_err_member_notexist}');

register_err_member_notexist is in thm/default/i18n/english/msg in the data directory as is all my other error messages. I've rebuilt the theme.

I'm sure I'm missing something very simple, but damn if I know!

TIA,

Dave
Re: Adding to the user registration process [message #6423 is a reply to message #6421] Thu, 10 October 2002 08:11 Go to previous message
alphageek is currently offline  alphageek   United States
Messages: 7
Registered: October 2002
Karma: 0
Junior Member
alphageek wrote on Thu, 10 October 2002 04:00

I'm sure I'm missing something very simple, but damn if I know!



It was something simple. I found it! Now I just have to tweak my validation routines Smile

Dave
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Editing group members while forum is disabled.
Next Topic: Members-Only Forums
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 02:25:26 GMT 2024

Total time taken to generate the page: 0.03354 seconds