Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 03:27 am EST

Geeklog Forums

Custom Registration Problem


Status: offline

rjrufo

Forum User
Regular Poster
Registered: 06/14/03
Posts: 95
I'm trying to customize the registration for to include the gl_forum_userinfo tabe to no avail. I have it to the point where it inserts the uid, but nothing else. Anyone have any suggestions? I can post the code I currently have if that will help, so let me know.

Thanks in advance.
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
I don't fully understand what your trying to do. Are you trying to add the extended user information as part forum 2.3 install to the user information page ?

This is different then the custom registration feature.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

rjrufo

Forum User
Regular Poster
Registered: 06/14/03
Posts: 95
Hi Blaine,

Yes, that is exactly what I'm trying to do. I do have some other custom information that works fine, but the extra fields from Forum 2.3 just don't want to be included.

If there is a way to include them in the custom registration form, I'd love to do it. Have any ideas how?
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
The additional user information fields are only designed to be part of the User Account Profile page. There are plugin API's that are called. All thats needed is to add the template variables to the profile.thtml files as noted in the forum install_doc.

If your trying to prompt the user for this information as part of the registration - then that's different. In that case, you will have to write your own PHP to handle this - and use the Custom Registration features.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

rjrufo

Forum User
Regular Poster
Registered: 06/14/03
Posts: 95
Sorry Blaine,

I misunderstood what you didn't understand - if that makes any sense. I am trying to create a registration form that includes all of the information that is listed on the Account Information page, as well as the extra forum information. I've got everything working except for the location, interests, and IM screen names from the forum_userinfo table. The form adds the uid to the table, but nothing else. I've attached the part of code from lib-custom.php, if that will help. I don't understand why it doesn't insert the information in that particular table, but the rest of the information is.

Text Formatted Code

function custom_usercreate($uid) {
    global $_CONF,$_TABLES,$HTTP_POST_VARS;

    // Ensure all data is prepared correctly before inserts, quotes may need to be escaped with addslashes()

    $sig        =addslashes($HTTP_POST_VARS['sig']);
    $pgpkey     =addslashes($HTTP_POST_VARS['pgpkey']);
    $about      =addslashes($HTTP_POST_VARS['about']);
    $location   =addslashes($HTTP_POST_VARS['location']);
    $aim        =addslashes($HTTP_POST_VARS['aim']);
    $icq        =addslashes($HTTP_POST_VARS['icq']);
    $yim        =addslashes($HTTP_POST_VARS['yim']);
    $msnm       =addslashes($HTTP_POST_VARS['msnm']);
    $interests  =addslashes($HTTP_POST_VARS['interests']);

    DB_query("UPDATE {$_TABLES['users']} SET
            email='{$HTTP_POST_VARS['email']}',
            homepage='{$HTTP_POST_VARS['homepage']}',
            fullname='{$HTTP_POST_VARS['fullname']}',
            sig='{$HTTP_POST_VARS['sig']}'
            WHERE uid=$uid");

    DB_query("UPDATE {$_TABLES['userinfo']} SET
        pgpkey='{$HTTP_POST_VARS['pgpkey']}',
        about='{$HTTP_POST_VARS['about']}'
        WHERE uid=$uid");

        DB_query("UPDATE {$_TABLES['forum_userinfo']} SET
            location='{$HTTP_POST_VARS['location']}',
            aim='{$HTTP_POST_VARS['aim']}',
            icq='{$HTTP_POST_VARS['icq']}',
            yim='{$HTTP_POST_VARS['yim']}',
            msnm='{$HTTP_POST_VARS['msnm']}',
            interests='{$HTTP_POST_VARS['interests']}'
            WHERE uid=$uid");
           
    return true;

}

 
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
if the user record in the forum_userinfo table does not yet exist, then you will want to do a INSERT and not a UPDATE.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

rjrufo

Forum User
Regular Poster
Registered: 06/14/03
Posts: 95
Blaine,
I tried that and it comes back with an error:

Sun Apr 25 23:02:42 2004 - 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE uid=165' at line 8. SQL in question: INSERT gl_forum_userinfo SET
location='test',
aim='test',
icq='test',
yim='test',
msnm='test',
interests='test'
WHERE uid=165

Ok, maybe I'm just tired from fighting with this all day, but what am I missing?

I guess I'll go to bed and see what happens tomorrow, maybe it'll be a better day.
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
The format for the INSERT SQL is different then the UPDATE. Check the mysql syntax manual.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

All times are EST. The time is now 03:27 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content