forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 permissions => Topic started by: nickkader on March 28, 2013, 08:44:34 pm

Title: How to make all albums private when users registers
Post by: nickkader on March 28, 2013, 08:44:34 pm
Is there a way to have when a new user register it create an album when they register and only limit to one and have all users automatic private from other users? Also I cant seem to find to find the html to edit my links?
Title: How to make all albums private when users registers
Post by: nickkader on March 29, 2013, 03:48:18 am
How to make all albums private when users registers.
Title: How to make all albums private?
Post by: nickkader on March 31, 2013, 09:31:04 pm
I want users albums to automatically be set to private when they register cause I have it set up when they register an album is created automatically so how can I make it private when they register or make all albums private.
Title: Re: How to make all albums private?
Post by: Αndré on April 09, 2013, 12:28:59 pm
Open register.php, find
Code: [Select]
    // Create a personal album if corresponding option is enabled
    if ($CONFIG['personal_album_on_registration'] == 1) {

        $catid = mysql_insert_id() + FIRST_USER_CAT;
        cpg_db_query("INSERT INTO {$CONFIG['TABLE_ALBUMS']} (`title`, `category`) VALUES ('$user_name', $catid)");
    }
and replace with
Code: [Select]
    // Create a personal album if corresponding option is enabled
    if ($CONFIG['personal_album_on_registration'] == 1) {

        $catid = mysql_insert_id() + FIRST_USER_CAT;
        cpg_db_query("INSERT INTO {$CONFIG['TABLE_ALBUMS']} (`title`, `category`, `visibility`) VALUES ('$user_name', $catid, $catid)");
    }


Additionally, you maybe want to apply the same mod to usermgr.php.
Title: Re: How to make all albums private when users registers
Post by: Αndré on April 09, 2013, 02:13:07 pm
I just found your other two threads regarding the same issue and merged them with this thread. Next time, please don't double post. Thank you.