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: User profiles not correct after integration  (Read 3595 times)

0 Members and 1 Guest are viewing this topic.

zorbas2

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
User profiles not correct after integration
« on: September 09, 2004, 01:17:22 pm »

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
Logged

Nibbler

  • Guest
Re: User profiles not correct after integration
« Reply #1 on: September 09, 2004, 10:47:39 pm »

Did you have users in coppermine prior to integration ?
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: User profiles not correct after integration
« Reply #2 on: September 10, 2004, 01:55:43 am »

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.
Logged
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

  • Coppermine novice
  • *
  • Country: gr
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • not bridged yet :(
    • Zorbas Travel Stoupa - Greece
Re: User profiles not correct after integration
« Reply #3 on: September 10, 2004, 09:08:43 am »

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??
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: User profiles not correct after integration
« Reply #4 on: September 10, 2004, 02:06:34 pm »

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;

Quote
UPDATE  `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.
Logged
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
Pages: [1]   Go Up
 

Page created in 0.014 seconds with 15 queries.