Advanced search  

News:

cpg1.5.36 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.34 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Registration via admin doesn't create user gallery but registration page does  (Read 3711 times)

0 Members and 1 Guest are viewing this topic.

videomaster

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

1.5.16 I'm trying to set up a system that stores medical records. Due to legal matters, each client can only see there pictures, and no one else's. I turned on "Create user album in personal gallery" on registration in config:registration. When I add the user from the register page it works perfectly, however, when I use the admin page and add new user, the private gallery is never created.

Also the admin cannot see or edit the private galleries, so until I upload the files, I don't know if it has been created.

this web is in development, so i can erase and start over, but don't know why it isn't working.

Thanks in advance
RJ
PS I know there might be format to submit issues, but this is my first post and don't know all the rules :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15039

I turned on "Create user album in personal gallery" on registration in config:registration. When I add the user from the register page it works perfectly, however, when I use the admin page and add new user, the private gallery is never created.

I agree that there's an inconsistency in this case. I'll check if it also happens in my testbed and consider to apply that config option also to the user manager (while I was never happy with that option). The docs have to be adjusted accordingly.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15039

Open usermgr.php, find
Code: [Select]
log_write('New user "'.$user_name.'" created', CPG_ACCESS_LOG);and below, add
Code: [Select]
        // Create a personal album if corresponding option is enabled
        if ($CONFIG['personal_album_on_registration'] == 1) {
            $catid = $user_id + FIRST_USER_CAT;
            cpg_db_query("INSERT INTO {$CONFIG['TABLE_ALBUMS']} (`title`, `category`) VALUES ('$user_name', $catid)");
        }


Please confirm if it works as expected.
Logged

videomaster

  • Coppermine newbie
  • Offline Offline
  • Posts: 4

Yes, this above solution works and adds the personal gallery to the user id when adding users via admin panel. However, since the admin can't administer personal galleries (add, modify, update, delete)  it doesn't do what I needed, and won't work for me.

I ended up creating an individual group for each user, so every group contains only 1 user.

Not a clean way to do it, but the only way I found to keep each person's information private. More steps for setup are required as I have to create a group for each user, and then add that group back into the appropriate album.

If the admin could administer personal galleries as created by the user when registering, then all the items are created when the user registers, including matching their album to the created user name.

So there are some benefits to this application, and the above solution does create the personal gallery, but without admin access, I cannot see a real useful purpose.
Logged
Pages: [1]   Go Up
 

Page created in 0.06 seconds with 20 queries.