Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: how user can register in custom group  (Read 2669 times)

0 Members and 1 Guest are viewing this topic.

catfish

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
how user can register in custom group
« on: December 09, 2003, 01:16:02 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
how user can register in custom group
« Reply #1 on: December 09, 2003, 05:50:08 pm »

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
Logged

Oasis

  • VIP
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 252
  • iNSiGNiA
    • Pixnet Gallery
how user can register in custom group
« Reply #2 on: December 09, 2003, 07:00:02 pm »

try this:

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

find:
Code: [Select]
       $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:
Code: [Select]
       $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
Logged
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

catfish

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
thanks
« Reply #3 on: December 10, 2003, 05:34:55 pm »

it works thanks a lot for prompt answers
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 14 queries.