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 to make all albums private when users registers  (Read 9531 times)

0 Members and 1 Guest are viewing this topic.

nickkader

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
How to make all albums private when users registers
« 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?
Logged

nickkader

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
How to make all albums private when users registers
« Reply #1 on: March 29, 2013, 03:48:18 am »

How to make all albums private when users registers.
Logged

nickkader

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
How to make all albums private?
« Reply #2 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: How to make all albums private?
« Reply #3 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: How to make all albums private when users registers
« Reply #4 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.