Page 1 of 1

Admin status lost

PostPosted: May 11th, 2010, 5:22 am
by Nige
Nice pluggin - very nice!

Just one comment:

If you test the system from being logged in as admin, when you are redirected back from paypal you have lost your admin status. I setup a second admin beforehand so was lucky. Is this worth a look at?

Re: Admin status lost

PostPosted: May 11th, 2010, 9:19 am
by rossagrant
This is because you ran the transaction whilst being logged in as admin. Make sure you arren't logged in before going through Paypal.

Re: Admin status lost

PostPosted: May 13th, 2010, 12:39 am
by Jason Caldwell
Ross is correct.
We are going to make this impossible in the next release.
Thanks for reporting this important issue.

Re: Admin status lost

PostPosted: May 14th, 2010, 1:18 am
by JanM
I have the same problem but I have no 2nd administrator now I cannot access my blog anymore I need this fixed urgently please any help

Re: Admin status lost

PostPosted: May 14th, 2010, 1:48 am
by HTMwebrat
Can you go into phpmyadmin and bring back the admin status that way?
Back up your database before making any changes, however!

Look under wp_usermeta, find the user_id column with 1 (there are a few entries with this) and see what it says under column meta_key wp_capabilities. If it has something like s2member_level1, try changing it to -

a:1:{s:13:"administrator";b:1;}

(note that this is my setting and I'm not sure what the other things in there mean, I'm new to Wordpress myself, t his is also assuming that your admin account was the default first user).

Re: Admin status lost

PostPosted: May 14th, 2010, 2:02 am
by JanMetten
Yes this solved the problem thank you so much

Re: Admin status lost

PostPosted: May 14th, 2010, 2:03 am
by HTMwebrat
Excellent, glad it worked!

Re: Admin status lost

PostPosted: May 14th, 2010, 4:08 am
by fasterpc
I have the same problem, but cannot understand what I need to do to log in as admin. Can you pleaes explain in laymen terms?

I'm not sure where to find phpmyadmin?

Thanks,

Stewart

Re: Admin status lost

PostPosted: May 14th, 2010, 4:51 am
by HTMwebrat
Who is your web host? If you log into your hosting account's control panel, there should be an area where it talks about MySQL databases and phpmyadmin will be under there. If your account doesn't have a control panel, you might have to ask them for the link and login info to phpmyadmin.

Re: Admin status lost

PostPosted: May 15th, 2010, 4:16 am
by fasterpc
I use Host Gator and can acces my PHP admin ok. I changed id 1 wp_capabilities to: a:1:{s:13:"administrator";b:1;} as suggested but still i cannot log in as admin.

Is there a way to set up a new admin username and password from here?

Thanks.

Re: Admin status lost

PostPosted: May 15th, 2010, 4:21 am
by fasterpc
I actually changed wp_capabilities under user_id column with 4 by mistake, and of course I did not back up that original info so i cannot change it back to what it should be. Will this cause a problem?

Re: Admin status lost

PostPosted: May 15th, 2010, 5:55 am
by HTMwebrat
I would suggest changing it to something like -
a:1:{s:10:"subscriber";b:1;}

(this was a test subscriber account I made with no privileges)

so they're a subscriber without admin status. Look at the nickname for that ID, is that an account you made, or one of your users? If it's left as administer, that means that person will have admin privileges.

Re: Admin status lost

PostPosted: May 15th, 2010, 9:46 am
by fasterpc
Ok thanks, I changed that back.

Does anyone know if I can create a new admin username and password so i can log in to my site? Steps to do this would be a great help.

Thanks again.

Re: Admin status lost

PostPosted: May 15th, 2010, 11:33 am
by HTMwebrat
SQL query to run in phpmyadmin, when you go into your database, there's a tab says SQL, you can enter this there -

http://wordpress.org/support/topic/209856?replies=5

Re: Admin status lost

PostPosted: May 16th, 2010, 6:18 am
by fasterpc
Thanks for this info. But as someone that's new to PHP can anyone tell me how to insert this information so that it actually works.

I have tried every way I can think of without success. I need the actual steps to insert the info once logged into my PHP admin, selecting wp_usermeta, then clicking on the SQL tab...

This is where I need help, on how to insert the following... What goes where? What needs to be removed (commas, brackets, etc), what's stays?

INSERT INTO 'wp_usermeta'('umeta_id','user_id','meta_key','meta_value') VALUES
(1, 1, 'nickname', 'admin'),
(2, 1, 'rich_editing', 'true'),
(3, 1, 'admin_color', 'fresh'),
(4, 1, 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}'),
(5, 1, 'wp_user_level', '10');

Step by step help would be greatly appreciated.

Re: Admin status lost

PostPosted: May 16th, 2010, 6:41 am
by HTMwebrat
This link is more in-depth, hope it helps -
http://www.dnawebagency.com/how-to-add- ... s-database

Re: Admin status lost

PostPosted: May 16th, 2010, 10:41 am
by fasterpc
Many thanks for that step by step help. I finally got it.

See it's easy when you know how!

Regards,

Stewart

Re: Admin status lost

PostPosted: May 19th, 2010, 5:31 am
by Jason Caldwell
Jason Caldwell wrote:Ross is correct.
We are going to make this impossible in the next release.
Thanks for reporting this important issue.


Starting with s2Member v3.0. It is now impossible to lock yourself out.
Thanks to everyone that helped with this.