Enhanced Your WordPress Authentication


Sponsored Links




How To Enhancer Your WordPress authentication and added better handled and criteria. John Kolbert, one of WordPress developer create some tutorial how to do it. On this tutorial John Kolbert try to added same parameter and made own criteria…

WordPress Authentication - Miranda Kerr Black Leather

WordPress Authentication - Miranda Kerr Black Leather

John using add_filter method to create it. He tweak original function of wp_authenticate. On this example John add new parameter that will denied username bob.

First, Create custom function on functions.php and add_filter wp_authenticate with new function has created

add_filter( 'authenticate', 'my_custom_function', 10, 3 );
function my_custom_error_shake( $shake_codes ){
    $shake_codes[] = 'denied';
    return $shake_codes;
}

function my_custom_function( $user, $username, $password ){
    $user = get_userdatabylogin( $username );  //we don't really need this, but you might
    if( $username == 'bob'  ) {  //if the username is bob
        $user = new WP_Error( 'denied', __("<strong>ERROR</strong>: We do not allow people with the name Bob into this site") );
        remove_action('authenticate', 'wp_authenticate_username_password', 20);
        add_filter('shake_error_codes', 'my_custom_error_shake');	//make the login box shake
     }
     return $user;
}

That’s it’s, you can test it on your own WordPress and try to logging with username bob. Please note, you can replace bob with your own desire name. If you need more details about this tutorial you can leave comment on John Kolbert Tutorial

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net

Beef Up WordPress Security with Multifactor Authentication from Google

Here’s what the enhanced login box will look like with is it time to think about multifactor authentication as a standard for WordPress sites? What’s your opinion? Read More

SSL Client authentication for IIS « Developer Gripes

Visit an IIS web page on the site that requires SSL client authentication. You are commenting using your WordPress.com account. ( Log Out / Change ) Read More

SharePoint 2010 New and Enhanced Collaboration Features « Sharing

Group authentication based on distribution list or user interface of SharePoint calendar is enhanced. You are commenting using your WordPress.com account. Read More

Using client certificate authentication w/ BC ProxySG « Dvas0004

Recall that authentication is the process of validating the “Details” tab and select the “Enhanced You are commenting using your WordPress.com account. Read More

Logical Access (smart card logon) requirement and PIV cards

to the end entity must have enhanced In addition, for external DC Authentication certificates, each client on your You are commenting using your WordPress.com Read More


2 Responses to Enhanced Your WordPress Authentication

  1. raiderhost says:

    nice tips pakde ,,,

    mantab di kasih di single ternyata :D

  2. Pingback: Extra Validation on WordPress Login : Seize the Chocolate

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>