Registration via admin doesn't create user gallery but registration page does Registration via admin doesn't create user gallery but registration page does
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Registration via admin doesn't create user gallery but registration page does

Started by videomaster, November 26, 2011, 10:48:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

videomaster

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 :)

Αndré

Quote from: videomaster on November 26, 2011, 10:48:35 PM
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.

Αndré

Open usermgr.php, find
log_write('New user "'.$user_name.'" created', CPG_ACCESS_LOG);
and below, add
        // 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.

videomaster

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.