News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

deleted account by accident, HELP!

Started by buzzzz, June 27, 2008, 09:26:48 PM

Previous topic - Next topic

buzzzz

while i was trying to remove some members form a certain membergroup, i accidentally hit "delete account"  >:(

is there a way i can restore their accounts?  :(

rsw686

Only if you have a backup of the database.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

ZorbAA

#2
yes this situation can be returned.
first you must create a new account with the same name which user you deleted. then run this SQL query:
UPDATE smf_messages SET ID_MEMBER ='NEW_MEMBER_ID' WHERE posterEmail = 'OLD_MEMBER_MAIL_ADDRESS'
if this query doesn't work then try this:
UPDATE smf_messages SET ID_MEMBER='NEW_MEMBER_ID' WHERE postername='OLD_MEMBER_USERNAME';
this way will solve your problem ;)
by ZorbAA

rsw686

The first query is missing a where statement and thus will not work. Plus this requires your user to recreate their account, fill in details, etc. If you have a backup you can restore it to a temporary database. Then extract the users you delete and import them into your live site.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

ZorbAA

Quote from: rsw686 on June 27, 2008, 10:25:11 PM
The first query is missing a where statement and thus will not work. Plus this requires your user to recreate their account, fill in details, etc. If you have a backup you can restore it to a temporary database. Then extract the users you delete and import them into your live site.
I had forgotten :) just have correted. ;)
by ZorbAA

buzzzz

#5
ZorbAA, new accounts created with same old usenames. can you tell me now how to run SQL query step by step pls.

example:
phpMyAdmin> next> and so on



thank you in advance

ZorbAA

Quote from: buzzzz on June 28, 2008, 06:12:53 AM
ZorbAA, new accounts created with same old usenames. can you tell me now how to run SQL query step by step pls.

example:
phpMyAdmin> next> and so on



thank you in advance
Look at the photo at the attachment. You shoulld click the button in the red square. then a query window will come. write the query which I gave at my old post. and run it. you should care this point; you should change somewhere in the codes I gave according to your site.

by ZorbAA

buzzzz

hello  again ZorbAA

sorry to disturb you. pls make it clearer

example member's name is goodguy

where should i change the given code?
UPDATE smf_messages SET ID_MEMBER='NEW_MEMBER_ID' WHERE postername='OLD_MEMBER_USERNAME';

is it like this?
UPDATE smf_messages SET ID_MEMBER='goodguy' WHERE postername='goodguy';

ZorbAA

Quote from: buzzzz on July 08, 2008, 10:26:25 AM
hello  again ZorbAA

sorry to disturb you. pls make it clearer

example member's name is goodguy

where should i change the given code?
UPDATE smf_messages SET ID_MEMBER='NEW_MEMBER_ID' WHERE postername='OLD_MEMBER_USERNAME';

is it like this?
UPDATE smf_messages SET ID_MEMBER='goodguy' WHERE postername='goodguy';

No it will not be as you wrote. It'll be like this:
UPDATE smf_messages SET ID_MEMBER='99999' WHERE postername='goodguy';
You shoud change the member ID which is settled as 99999. The number you have settled must not exist on your forum. For the other users, again change the member ID part and this time cahnge the part which wrote 'goodguy'.
I hope your problem will be solved. :)
by ZorbAA

buzzzz

I tried this
UPDATE smf_messages SET ID_MEMBER='670' WHERE postername='username';

i got this error message

Error

SQL query:

UPDATE smf_messages SET ID_MEMBER = '670' WHERE postername = 'username'

MySQL said: Documentation
#1146 - Table '*******_zc1.smf_messages' doesn't exist


what wrong ZorbAA  :(

lax.slash

When you installed SMF... did you use another prefix? Like forums_, community_, or something that wasn't smf_?

tatore

Quote from: lax.slash on July 09, 2008, 09:58:40 AM
When you installed SMF... did you use another prefix? Like forums_, community_, or something that wasn't smf_?
That's the issue  ;)
You have to replace smf_messages with your corrisponding correct _messages smf table name.
*Salvo*




Quote from: RumbaarI wont jump to conclusion, but you might be hacked?

lax.slash

Admin CP -> Server Settings -> Core Configuration  -> Database Tables Prefix:

Replace "smf_" with the value in that textbox. :)

buzzzz

hi guys, i was not the one who installed smf. how will i know what to replace smf_messages

Quote from: lax.slash on July 09, 2008, 11:11:30 AM
Admin CP -> Server Settings -> Core Configuration  -> Database Tables Prefix:

Replace "smf_" with the value in that textbox. :)

Ok, I will try that. Sorry I deleted my post by accident (again)  :-[

ZorbAA

Quote from: buzzzz on July 09, 2008, 11:24:41 AM
hi guys, i was not the one who installed smf. how will i know what to replace smf_messages

Quote from: lax.slash on July 09, 2008, 11:11:30 AM
Admin CP -> Server Settings -> Core Configuration  -> Database Tables Prefix:

Replace "smf_" with the value in that textbox. :)

Ok, I will try that. Sorry I deleted my post by accident (again)  :-[
You can check the prefix by phpmyadmin ;)
by ZorbAA

buzzzz


lax.slash

Just look in the database where you have SMF stored. Look in the table list for the words "boards" "calendar" or "package_servers." Whatevers before those would be your table prefix. For example, one of my sites is msgbrd_boards, msgbrd_calendar, and msgbrd_package_servers. Since "msgbrd_" is before all of those, my prefix would be msgbrd_ which would mean I would have the code:


UPDATE msgbrd_messages SET ID_MEMBER='670' WHERE postername='username';

buzzzz

#17
my prefix is smf_

and when i tried this
UPDATE smf_messages SET ID_MEMBER='670' WHERE postername='username';

the user becomes guest. but still can log in and become registered member again



edit;
my forum is flooded by errors like this  :(


512: loadMemberContext(): member id 670 not previously loaded by loadMemberData()
File: /home/*******/public_html/Sources/Load.php
Line: 969

lax.slash

Can you please give a link to your forum?

buzzzz

#19
i sent you the link


errors continues to flood  :(

Advertisement: