Where is profilcp_register.php

Support for IntegraMOD 140

Moderator: Integra Moderator

Where is profilcp_register.php

PostAuthor: Dragonsys » Tue Oct 31, 2006 8:42 am

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.
Last edited by Dragonsys on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: Where is profilcp_register.php

PostAuthor: Teelk » Wed Nov 01, 2006 6:21 pm

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);         }  
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada

Re: Where is profilcp_register.php

PostAuthor: Dragonsys » Thu Nov 02, 2006 7:27 am

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.
Last edited by Dragonsys on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: Where is profilcp_register.php

PostAuthor: Teelk » Thu Nov 02, 2006 3:05 pm

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.
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada

Re: Where is profilcp_register.php

PostAuthor: Dragonsys » Thu Nov 02, 2006 3:14 pm

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...
Last edited by Dragonsys on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
Image
User avatar
Dragonsys
Sr Integra Member
Sr Integra Member
 
Posts: 326
Likes: 0 post
Liked in: 0 post
Joined: Mon Apr 10, 2006 7:45 am
Cash on hand: 0.00
Location: Springtown, TX

Re: Where is profilcp_register.php

PostAuthor: Teelk » Wed Nov 08, 2006 2:52 am

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.
Last edited by Teelk on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 6:25 pm
Cash on hand: 0.00
Location: Canada


Return to IntegraMOD 140

Who is online

Registered users: Google [Bot], Unspecified Bot