latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

WP-Admin redirecting to login welcome page

Home Forums Community Forum WP-Admin redirecting to login welcome page

This topic contains 2 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 10 months ago.

Topic Author Topic
Posted: Tuesday Mar 12th, 2013 at 6:51 pm #44435

Hi,

I’ve just changed my Login Welcome page but cannot access the admin area at all since clicking save changes.

I was logged in as admin when it happened, have logged out, rebooted etc. still stuck…

When I try and log back in under my Admin user account it redirects to Welcome page instead of wp-admin so I am completely locked out!

Any ideas anyone?

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Wednesday Mar 13th, 2013 at 5:23 am #44460

Hi,

Have found issue and fixed but definitely worth sharing…

One of my pages does a conditional role change (i.e. upgrade level) using php. top tip is to remember to add an extra condition to only do the role change to a specific current role (which I didn’t).
When I viewed the new page logged in as an admin, it changed my role!

i.e.
$user_id = S2MEMBER_CURRENT_USER_ID;
$user_level = S2MEMBER_CURRENT_USER_ACCESS_LEVEL;
if($user_level == 0)
{
$user = new WP_User($user_id);
$user->set_role(“s2member_level1”);
}

If you ever suffer same fate the fix is to access the wp database directly and edit your wp capabilities in the user meta data table – change it back to administrator!

Posted: Thursday Mar 14th, 2013 at 10:38 am #44613

Glad you found the problem and fixed it, Clifford. I’m sure that your update will help others having this problem. :)

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.