Page 1 of 1
Where is profilcp_register.php

Posted:
Tue Oct 31, 2006 8:42 am
Author: Dragonsys
I need to make some changes to the SQL INSERT when a new user registers on my site, but i cannot find the profilcp_register.php file.
Was it replaced with something else in IM?
The problem I am having is that I need one of the fields in phpbb_users to default to 1.
The DB is set as default of 1 and I put the below code into profilcp/def/def_userfields_phpbb.php
- Code: Select all
'user_allowweblog' => array( 'type' => 'TINYINT', 'length' => 1, 'not_null' => true, 'default' => 1, ),
But it is still set to 0 when someone registers on the site.
Re: Where is profilcp_register.php

Posted:
Wed Nov 01, 2006 6:21 pm
Author: Teelk
I have the same problem for some reason. But, you can find the appropriate code in profilcp_board_config.php.
Somewhere around here...
- Code: Select all
// insert user + start transaction $sql = "INSERT INTO " . USERS_TABLE . "($sql_key) VALUES ($sql_val)"; if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) ){ message_die(GENERAL_ERROR, 'Could not insert data into users table', '', __LINE__, __FILE__, $sql); }
Re: Where is profilcp_register.php

Posted:
Thu Nov 02, 2006 7:27 am
Author: Dragonsys
well, I have poked around in there, and i still don't have an answer. This is just strange, from looking at the code, I would think that unless a value is submitted a field should take it's default value, but this is not the case.
I don't get it.
Re: Where is profilcp_register.php

Posted:
Thu Nov 02, 2006 3:05 pm
Author: Teelk
I know what you mean, I banged my head against the wall trying to come up with a solution. The only thing I can think of is that PCP is taking over for the default, with it's user_xxxx_over fields.
eg.
user_website
user_website_over
The "over" field is a switch which decides whether something should be overriden( ACP>General Admin>Configuration+).
I'm gonna look into this again, cause it drove me nuts. There's gotta be something in PCP where some user fields can be given exceptions to the over thing.
Re: Where is profilcp_register.php

Posted:
Thu Nov 02, 2006 3:14 pm
Author: Dragonsys
Well, the field I'm working with isn't something that is user selectable, so there is not an option to Override user selection.
I wonder if I can put a hidden field in the registration which will set this to the correct entry...
Re: Where is profilcp_register.php

Posted:
Wed Nov 08, 2006 2:52 am
Author: Teelk
Well, I've found the function that dictates whether the default field value or the configuration+ value is used. It's in includes/usercp_profile.php, the function setDefaultUserdata, it's the first one.
Now I just need to decipher it.