Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

"Cheatin' Uh?" Error Message for User Role Login WordPress


Hi, I added a user to my Buddypress Wordpress installation as an Author, and then tried logging in as him, and I got this error message...

"Cheatin Uh?"

I found the code for this in the /wp-admin/options.php file -

/** WordPress Administration Bootstrap */

$title = __('Settings');
$this_file = 'options.php';
$parent_file = 'options-general.php';

wp_reset_vars(array('action', 'option_page'));

$capability = 'manage_options';

if ( empty($option_page) ) // This is for back compat and will eventually be removed.
$option_page = 'options';
$capability = apply_filters( "option_page_capability_{$option_page}", $capability );

if ( !current_user_can( $capability ) )
wp_die(__('Cheatin’ uh?'));

I also found this little Trac on the Wordpress Trac website -

Is it possible right now to fix this so that I can add users and assign various roles to them? Because as of right now, this does not work...

Thanks for your help!

Answers (1)


John Cotton answers:

Hi Spencer

What is it you want to the author role to do that you're being blocked from?

WordPress can be a bit strict in terms of what each standard role does so it might be worth considering a custom role (see [[LINK href=""]]add_role[[/LINK]]) for your site where you can mix and match various responsibilities to give you precisely what you want.


Spencer Barfuss comments:

I'd like to add a user as a "Contributor".

John Cotton comments:

So, to be clear, you want a user with Author capabilities to be able to add other users but only up to Contributor level?

Spencer Barfuss comments:

Well, in the drop-down User role box, it gives options for Contributor, Author, and more. I'd like to add a user with the role Contributor. I can add that role just fine and it saves in the backend, but the problem comes up when I try to login with that user.

It won't let me if I give them a user role other than Administrator...

John Cotton comments:

<blockquote>but the problem comes up when I try to login with that user.</blockquote>

Do you mean at /wp-login.php?

What happens? You should be able to log in with any login/pass combination, it's just the dashboard that changes depending on the role.

Can you do a screen grab of what you have? (or better still send a link?)

Spencer Barfuss comments:

No need to send the link, but yes, it's at /wp-login.php. If I add a user and assign a role other than Administrator, it does not log them in, and instead, shows this message - "Cheatin Uh?"

John Cotton comments:

The only thing two things I can think of is eaither:

a/ The users are actually being created....have you checked the database or logged back in with an admin account to see that they are really there?

b/ You're getting to the wp-login.php from a redirect of a page that Contributors don't have access to, eg you go to, get redirected to login and then get the message.

There are quite a few pages in the dashboard that would display the Cheatin' message.

If it's neither of the above, then I'm stumped.