coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: Furvy on March 25, 2008, 09:04:49 PM

Title: Editing album and photo ownership in MySQL
Post by: Furvy 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
Title: Re: Editing album and photo ownership in MySQL
Post by: Furvy 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
Title: Re: Editing album and photo ownership in MySQL
Post by: Nibbler 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.
Title: Re: Editing album and photo ownership in MySQL
Post by: seanpk 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.
Title: Re: Editing album and photo ownership in MySQL
Post by: Nibbler on April 13, 2008, 10:30:05 PM
You need to change it manually in the database.