View Full Version : Disconnected Gallery from User
June 10th, 2013, 12:59 PM
Earlier this spring, the former owner of my site purged some older registrations and content on my site that is running Photopost with VBulletin integration because of some issues with registrations not being processed correctly.
I do not know exactly what she did (it fixed the registration problem) but the bad result for some users is that their entire account was deleted. Oddly, all their gallery uploads are still visible, but if you click on their username, it says invalid user.
I was advised to have the people to which this happened register again with the previous username. That works just fine but they do NOT get reconnected to their old gallery, they are assigned a new gallery id.
One user was nice enough to show me what she got
old gallery (sorry can't post live links yet, too much of a noob)
digiscrapaddicts DOT com/gallery/u18857-staciemac.html
digiscrapaddicts DOT com/gallery/u57918-staciemac.html
She brilliantly noticed the user IDs being different and asked if I could connect her new registration with her OLD gallery (it's HUGE, a lot of time went into uploading to it)
So....is there a way to edit her account in vBulletin or Photopost to assign that old gallery id to her recreated username?
THANKS SO MUCH
June 10th, 2013, 01:14 PM
well there is a script we have you can use at your own risk that may work as your issue is different than it was intended for but might help.
Basically if the username is the exact in the forum as it is on the gallery username this script takes the username from the photos and comments tables and matches them against the forum username and grabs the new updated userid.
We have the script to assist users who switch forums and it counters the issue where forum importers change userids of users.
June 10th, 2013, 01:24 PM
that look interesting but I'll admit I'm a little scared to run it because everything else is working so nicely right now. I just have 2 of these orphaned usernames. I would love to just be able to make the change manually if you would just be able to tell me where.
June 10th, 2013, 01:26 PM
Download the script and look at what it does it runs queries
You should be fine all the script does is grabs the username from the photos table gets the userid from vb and then runs update sqls on photos and comments.
There is no need to be scared if your app is installed correctly.
June 10th, 2013, 02:00 PM
OK Chuck, is there a certain folder to which I should upload this?
June 10th, 2013, 03:00 PM
Yes per that post you upload the file to your photopost directory and run it in the browser. ;)
June 10th, 2013, 08:51 PM
rats, that did not work
the script ran without errors
I was mildly entertained to see that there was a previous copy of the script left in the gallery folder from Aug 2010
If I click on the username in the previously uploaded gallery I still get "invalid user specified"
I still need a way to manually assign a certain gallery user id to a specific username in vBulletin
June 10th, 2013, 09:17 PM
The username then in the gallery does not match the forum if that script does not work your only other recourse is to issue some query in your database to set use rid if user is blah blah.
Have you ever used phpmyadmin
June 10th, 2013, 09:25 PM
yes, I've used phpMyAdmin and I've had some instances where I needed to go into tables and directly edit entries as well. So I'm good with that but I'm not familiar with how the tables are set up with registration happening in vBulletin and then handed over to Photopost. I suppose I could spend a couple hours poking around the database tables but I'm guessing you can point me to the right tables faster. (hopefully!!!)
I just got another email from someone with the same issue and I think now that word is getting out that I have taken over the site and am trying to bring it back to life that more people will come forward with the same issue
Thanks for helping me on this, Chuck.
June 10th, 2013, 09:38 PM
Like I said the script I linked here updates the userid for username from the gallery so what it does is take the username that is on the photo and searches for a userid from the forum and updates it on the gallery end. The only way the script will not work is if it does not find a user based on the username in the gallery.
It is hard to comment further here without direct information specific to your issue.
I can tell you the base queries we use to update things what you do with them is up to you as your the one saying the script does not work which only says the names are not being found.
UPDATE pp_photos SET userid = 'SOMEUSERID' WHERE user='SOMEUSER';
UPDATE pp_comments SET userid = 'SOMEUSERID' WHERE username='SOMEUSER';
June 11th, 2013, 07:36 AM
OR -- it doesn't work because there are two instances of the username in photopost as I originally stated. The script WAS created for something else as you said.
I did give specific info in my first post -- I provided "links" that display the doubled username and the 2 different gallery IDs.
June 11th, 2013, 09:24 AM
The script was created to update a userid based off a username. Just because the script was not created for your specific issue does not mean it should not work providing your telling me the correct information. Your telling me the user registered a new name in the forum which IS the same exact name that is on the gallery. That is what you said.
Obviously though the info your giving here is not exact because your issue would be resolved which is why I said I would need more info.
I gave you some queries you can run in phpmyadmin with the right info that should help you but the only reason the right userid is not going to be updated on the photos and comments table when running the script I linked is if we can not find a user in vbulletin with the name.
Hense the issue is there is no user on your forum with that username so as I posted above either those two users registered different usernames.
I would suggest you check how the username is in the forum versus the gallery and see the difference if you want to see how its different.
You can also do quick queries in phpmyadmin like this if you know the specific userids
UPDATE pp_photos SET userid=57918 WHERE userid=18857;
UPDATE pp_comments SET userid=57918 WHERE userid=18857;
June 11th, 2013, 04:40 PM
the last set of queries you posted WORKED so thanks. I think it worked because it was reassigning the userids and not trying to match up the username. It doesn't do any good to match up the username if I have the same username twice. It's not supposed to happen but something about the way the other owner purged the boards caused a few of these usernames to be loose in the gallery without a corresponding user in the forum (where it had been deleted)
June 11th, 2013, 04:42 PM
I am just saying the script that searches for a userid based off what the username is on the photo and comments. If the username is not right to find a user then thats an issue and would definately cause the script to not work.
June 12th, 2013, 10:06 PM
l think I will start a poll to see what more people would think if its worth writing a vb4 plugin to delete all gallery content when you delete a user in the forum. I think most would not want that though.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.