 | |  | | | Photopost Pro How Do I...? Wondering how to do things in PhotoPost? |
February 27th, 2011, 07:35 PM
|
#1 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 77
| How to change a Username ?
Hello
Is there any SQL-Query to change a Username ?
A User wanted to change his Name. Now I changed the Username in Database pp_users.
All Photos uploaded by this User are still under the old Username.
I think I can change it all in pp_photos, but it would be a lot more easier to do it with a SQL-Query or a Function in ACP.
Regards
Michael
|
| |
February 27th, 2011, 08:21 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
If you have changed a user's username there is an option in scan database to update a username on photos and comments in that utility in admin.
|
| |
February 27th, 2011, 08:25 PM
|
#3 (permalink)
| | Member Verified Customer
Join Date: May 2008 Location: bethune, sc
Posts: 92
|
assuming the pp_photos table is all that you have to change an update statement should do the trick. there may be other tables, but I am not sure. something like
UPDATE pp_photos
SET pp_photos.user = 'username'
WHERE pp_photos.user = 'oldusername';
Its interesting they have the user id and user name in the table. I am assuming it is for performance reasons not having to do a join to get the username from the pp_users table. only a guess though.
|
| |
February 28th, 2011, 09:26 AM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Gene there is already functionality in the admin panel that updates usersnames that have changed.
|
| |
March 6th, 2011, 11:00 AM
|
#5 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 77
| Quote:
Originally Posted by Chuck S If you have changed a user's username there is an option in scan database to update a username on photos and comments in that utility in admin. | Thanks, worked fine in Gallery.
But in Statistics-Pal the Username is now missing. Check attachment.
I tried DB-Scans " recalculate photos/posts numbers" and " resync photo/comments usernames/update comments counts" without Success.
|
| |
March 6th, 2011, 03:56 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Maybe turn off the category cache?
what pal is that? Any pals the information is taken off whats in the database.
|
| |
March 6th, 2011, 04:33 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 77
|
Sorry, the empty Field comes from a deleted User.
How do I delete the number of uploaded Photos too ?
Category cache is always off, it`s the Original Topposter-Pal.
Last edited by Darwin; March 6th, 2011 at 05:00 PM.
|
| |
March 6th, 2011, 09:46 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
Okay well that makes sense. There is no way to delete photos after a user is deleted.
You can try inputting this url in your browser with your site name of course etc and change the userid to the userid of that deleted user to see if it deletes his photos. This is the url format used in a users profile where the admin can delete all there photos http://www.yoursite.com/gallery/adm-...lphotos&uid=49 |
| |
March 7th, 2011, 09:52 AM
|
#9 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 77
|
Thanks a lot, worked fine !
|
| |
March 7th, 2011, 10:59 AM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 68,070
|
No problem glad that worked.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 02:34 PM. | |