News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

how user can register in custom group

Started by catfish, December 09, 2003, 01:16:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

catfish

i created a custom group different rights than registered users
i would like certain people to register in the custom group (normal registration page with check box or different registration page doesn't matter much)
as you all guessed my knowledge of php allows only copy/paste/comment out
thanks for helping

Joachim Müller

That's the idea of custom groups: users can only register to become members in the group "registered" - you'll have to move them to any other group.
Surely the code could be modified to work as you want to, but I don't see the point...

GauGau

Oasis

try this:

make a copy of register.php and name it register2.php

find:
       $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} ".
                   "(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_location, user_interests, user_website, user_occupation) ".
                   "VALUES (NOW(), '$active', '$act_key', '".addslashes($user_name)."', '".addslashes($password)."', '".addslashes($email)."', '$location', '$interests', '$website', '$occupation' )";
        $result = db_query($sql);


replace it with:
       $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} ".
                   "(user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_location, user_interests, user_website, user_occupation, user_group) ".
                   "VALUES (NOW(), '$active', '$act_key', '".addslashes($user_name)."', '".addslashes($password)."', '".addslashes($email)."', '$location', '$interests', '$website', '$occupation', '##' )";
        $result = db_query($sql);

where ## is the number of their group (registered is 2, for example).

Then, tell them to register at http://yoursite.com/gallery/register2.php
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

catfish

it works thanks a lot for prompt answers