Editing album and photo ownership in MySQL Editing album and photo ownership in MySQL
 

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

Editing album and photo ownership in MySQL

Started by Furvy, March 25, 2008, 09:04:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Furvy

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

Furvy

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

Nibbler

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.

seanpk

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.

Nibbler

You need to change it manually in the database.