Deleted Anonymous User

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
mgregg99
Registered User
Posts: 38
Joined: Fri Oct 28, 2005 9:46 pm

Deleted Anonymous User

Post by mgregg99 » Tue Sep 10, 2019 12:16 pm

I deleted the Anonymous user in my database by accident and can't find any recent posts that address this issue. I've followed the advice from posts from nearly 7 years ago, but does anyone know of a current fix?

In Firefox I'm stuck as being logged in as a guest and don't see any of the forums and don't have a way to log back in as admin. In Edge, I was logged in as admin and saw everything fine, but as soon as I logged out I'm stuck being a guest and can't go back.

Thanks in advance for any help!

Mike

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69300
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Deleted Anonymous User

Post by KevC » Tue Sep 10, 2019 12:18 pm

To replace the Anonymous user run this SQL query

Code: Select all

INSERT INTO phpbb_users (user_id, user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (1, 2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0);
Change the table prefix if yours is not phpbb_.

See Executing SQL Queries in phpMyAdmin if you are unfamiliar with running queries.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

mgregg99
Registered User
Posts: 38
Joined: Fri Oct 28, 2005 9:46 pm

Re: Deleted Anonymous User

Post by mgregg99 » Tue Sep 10, 2019 1:23 pm

KevC wrote:
Tue Sep 10, 2019 12:18 pm
To replace the Anonymous user run this SQL query

Code: Select all

INSERT INTO phpbb_users (user_id, user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd, user_allow_massemail) VALUES (1, 2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 0);
Change the table prefix if yours is not phpbb_.

See Executing SQL Queries in phpMyAdmin if you are unfamiliar with running queries.
I get the following error when attempting that solution:

#1054 - Unknown column 'user_from' in 'field list'

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69300
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Deleted Anonymous User

Post by KevC » Tue Sep 10, 2019 1:26 pm

What version of phpBB are you running?
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

mgregg99
Registered User
Posts: 38
Joined: Fri Oct 28, 2005 9:46 pm

Re: Deleted Anonymous User

Post by mgregg99 » Tue Sep 10, 2019 2:23 pm

3.2.7

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69300
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Deleted Anonymous User

Post by KevC » Tue Sep 10, 2019 2:24 pm

Is it an updated version? If so are you sure the previous database updates were done correctly?
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

mgregg99
Registered User
Posts: 38
Joined: Fri Oct 28, 2005 9:46 pm

Re: Deleted Anonymous User

Post by mgregg99 » Tue Sep 10, 2019 2:28 pm

It's a brand new install. No prior versions existed.

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69300
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Deleted Anonymous User

Post by KevC » Tue Sep 10, 2019 2:36 pm

Scratch that.

Try this

Code: Select all

INSERT INTO `phpbb_users` (`user_id`, `user_type`, `group_id`, `user_permissions`, `user_perm_from`, `user_ip`, `user_regdate`, `username`, `username_clean`, `user_password`, `user_passchg`, `user_email`, `user_email_hash`, `user_birthday`, `user_lastvisit`, `user_lastmark`, `user_lastpost_time`, `user_lastpage`, `user_last_confirm_key`, `user_last_search`, `user_warnings`, `user_last_warning`, `user_login_attempts`, `user_inactive_reason`, `user_inactive_time`, `user_posts`, `user_lang`, `user_timezone`, `user_dateformat`, `user_style`, `user_rank`, `user_colour`, `user_new_privmsg`, `user_unread_privmsg`, `user_last_privmsg`, `user_message_rules`, `user_full_folder`, `user_emailtime`, `user_topic_show_days`, `user_topic_sortby_type`, `user_topic_sortby_dir`, `user_post_show_days`, `user_post_sortby_type`, `user_post_sortby_dir`, `user_notify`, `user_notify_pm`, `user_notify_type`, `user_allow_pm`, `user_allow_viewonline`, `user_allow_viewemail`, `user_allow_massemail`, `user_options`, `user_avatar`, `user_avatar_type`, `user_avatar_width`, `user_avatar_height`, `user_sig`, `user_sig_bbcode_uid`, `user_sig_bbcode_bitfield`, `user_jabber`, `user_actkey`, `user_newpasswd`, `user_form_salt`, `user_new`, `user_reminded`, `user_reminded_time`) VALUES
(1, 2, 1, '00000000000g13ydq8\nhwby9w000000\nhwby9w000000', 0, '', 1564580897, 'Anonymous', 'anonymous', '', 0, '', 0, '', 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'en', '', 'd M Y H:i', 1, 0, '', 0, 0, 0, 0, -3, 0, 0, 't', 'd', 0, 't', 'a', 0, 1, 0, 1, 1, 1, 0, 230271, '', '', 0, 0, '', '', '', '', '', '', '2g5hmhtnt3cgl4x7', 1, 0, 0);
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

User avatar
warmweer
Registered User
Posts: 2688
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: Deleted Anonymous User

Post by warmweer » Tue Sep 10, 2019 2:39 pm

mgregg99 wrote:
Tue Sep 10, 2019 2:28 pm
It's a brand new install. No prior versions existed.
Since that's the case, I suggest you empty the database and install a brand new board. That will take less time than fixing the missing field (+ who knows what else is wrong).
My board's not broken, it just went peculiar

mgregg99
Registered User
Posts: 38
Joined: Fri Oct 28, 2005 9:46 pm

Re: Deleted Anonymous User

Post by mgregg99 » Tue Sep 10, 2019 2:57 pm

A little tricky to execute using my iPhone, but was able to get it working. When I get home and can view it on my desktop I'll confirm if everything is working correctly.

Thanks for your help!

Mike

mgregg99
Registered User
Posts: 38
Joined: Fri Oct 28, 2005 9:46 pm

Re: Deleted Anonymous User

Post by mgregg99 » Tue Sep 10, 2019 3:00 pm

warmweer wrote:
Tue Sep 10, 2019 2:39 pm
mgregg99 wrote:
Tue Sep 10, 2019 2:28 pm
It's a brand new install. No prior versions existed.
Since that's the case, I suggest you empty the database and install a brand new board. That will take less time than fixing the missing field (+ who knows what else is wrong).
Kevc was able to provide a fix that saved me a ton of time. I'd already built all the forum categories and sub forums so this saved several hours of rebuilding.

User avatar
3Di
Former Team Member
Posts: 14088
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Deleted Anonymous User

Post by 3Di » Wed Sep 11, 2019 2:14 am

Code: Select all

INSERT INTO phpbb_users (user_id, user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_jabber, user_actkey, user_newpasswd, user_allow_massemail) VALUES (1, 2, 1, 'Anonymous', 'anonymous', 0, '', '', 'en', 1, 0, '', 0, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', 0);
This is a virgin ANONYMOUS, at the first visit will automatically take its own permissions etc.

Language: en
Style ID: 1 (on a fresh installation is prosilver)
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

Post Reply

Return to “[3.2.x] Support Forum”