User profiles not correct after integration User profiles not correct after integration
 

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

User profiles not correct after integration

Started by zorbas2, September 09, 2004, 01:17:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zorbas2

The users of my gallery at http://www.zorbas.de/webcam/gallery.php remarked that since the integration in my PunBB there is a problem when you click on the username: Most of the times not the right user profile will be displayed. Any idea how to solve this problem?

Here is an test account:
user: nibbler
pw: iJRa0t7G

Nibbler

Did you have users in coppermine prior to integration ?

Casper

This is because they have different user id numbers on the 2 applications.  When a pic is uploaded, the database gets the owner id from the usermanager being used at the time. 

When your coppermine was standalone, and user 25 added a pic, that is the id in the db.  But when you bridged, it is most unlikely that user is the same as user 25 on the bbs user table.  So now, although it still shows the original users name, the link to user 25 is to a different person.

This is why we recommend the bridge is done before the gallery goes live.

The only way around this for you, with hundreds of members, is to run a db query, if it is possible, to sync the 2 usernumbers.

Or to disable the bridge, but you will then have the same problem with pics added since the bridge was done.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

zorbas2

O, o.  Yes I thought so. There were users before I did the bridge. Not much, but still some. Thats why its messed up.
Casper, could you maybe explain a little more detailed how I could syncronise the two user databases? Just looking for the same users in the two tables and make sure their ID is the same??

Casper

Ok,

if there were only a few users before you bridged, the easiest way would probably be to change the gallery database, like this.

Find the user ID for these users on the bbs user table.  Edit the cpg user table so these members have the same user id as on the bbs.  

Then, you will need to run a series of queries in the cpg_pictures table, along these lines.

Say 'Tom' was user id 25 before, but is now user id 99, run this query;

QuoteUPDATE  `CPG_pictures`  SET  `owner_id`  =99 WHERE  `owner_name`  = 'Tom';

Change CPG to your actual cpg prefix, and the owner id to the one you want them to be, as well as the user name.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here