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: Editing album and photo ownership in MySQL  (Read 3099 times)

0 Members and 1 Guest are viewing this topic.

Furvy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Editing album and photo ownership in MySQL
« on: March 25, 2008, 09:04:49 pm »

I understand that this is unable to be done through the program, and I am prepared to change this directly within the database. However, I am not sure how to find the owner_id in relation to a username. I assume that it would be the reverse order than users are displayed in the userlist within Coppermine? Example:

User name
-----------------
RegisteredUser2      owner_id = 3
RegisteredUser1      owner_id = 2
Furvy                    owner_id = 1
-----------------

I also have no idea how to change album ownership. I don't see anything under the table cpg_albums which obviously relates to ownership.

Also, I wanted to know if anything like this will be implemented within Coppermine in 1.5? That would be really convenient :)

Thanks
Logged

Furvy

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Editing album and photo ownership in MySQL
« Reply #1 on: March 25, 2008, 09:50:55 pm »

I think I've got it, but would still like someone knowledgeable to respond.

It seems like the field "category" under table cpg_albums relates to ownership. It seems like the base number 10000 refers to a user album(?) and the ownership is determined by (base number)+(owner_id) so since I have owner_id = 1, I own all albums with the category = 10001.

Is this right? Is there anything else I would have to change in the database in order to make the albums and files function just as if they had been posted by the user I change their ownership to?

Thanks again
Logged

Nibbler

  • Guest
Re: Editing album and photo ownership in MySQL
« Reply #2 on: March 25, 2008, 11:29:58 pm »

That's right. You can easily find the user_id by looking at the profile links in Coppermine or the users table in the db. You also need to change the owner_name so that it matches up properly.
Logged

seanpk

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Editing album and photo ownership in MySQL
« Reply #3 on: April 13, 2008, 10:23:43 pm »

Where do I change the owner_name?
Is this done in a table in the db, or from web configuration screen?

Thanks.

P.S. It would be a handy feature to be able to change the ownership of an album through the web interface.
Logged

Nibbler

  • Guest
Re: Editing album and photo ownership in MySQL
« Reply #4 on: April 13, 2008, 10:30:05 pm »

You need to change it manually in the database.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.