Title: Change login message
Last modified: August 30, 2016

---

# Change login message

 *  Resolved [Skaks](https://wordpress.org/support/users/skaks/)
 * (@skaks)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/change-login-message/)
 * Hi,
    is it possible change the default login message?if yes, is possible to use
   the user first name instead the username? Thanks!
 * [https://wordpress.org/plugins/profile-builder/](https://wordpress.org/plugins/profile-builder/)

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

 *  [Teodor Cosofret](https://wordpress.org/support/users/teodor-cosofret/)
 * (@teodor-cosofret)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/change-login-message/#post-6807997)
 * Hi,
 * Yes that’s possible using a bit of coding:
 * – Create an empty plugin like this: [https://gist.github.com/sareiodata/76f701e01db6685829db](https://gist.github.com/sareiodata/76f701e01db6685829db)
 * – Add the following code to the end of it:
 *     ```
       /*
        * Filter the logged in message from the PB login form to display the first name instead of username
        * The first name links to Edit Profile
        */
   
       add_filter('wppb_login_message', 'wppbc_custom_logged_in_msg_3', 10, 3);
       function wppbc_custom_logged_in_msg_3($logged_in_message, $user_id, $display_name){
           $user = get_userdata ($user_id);
           $first_name = $user->first_name;
           $user_url = '<a href="http://www.yourdomain.com/edit-your-profile" class="wppb-author-url" title="'.$first_name.'">'.$first_name.'</a>';
           $logout_url = '<a href="'.wp_logout_url( $redirectTo = wppb_curpageurl() ).'" class="wppb-logout-url" title="'.__( 'Log out of this account', 'profilebuilder' ).'">'. __( 'Log out', 'profilebuilder').' »</a>';
           return '<p class="wppb-alert">' . sprintf(__( 'You are currently logged in as %1$s. %2$s', 'profilebuilder' ), $user_url, $logout_url ) . '</p><!-- .alert-->';
       }
       ```
   
 * – Change the url in the $user_url variable with the url of your Edit profile 
   page
 * – Install this plugin via FTP (copy it inside wp-content/plugins) or create a
   zip archive with it and install it via the WordPress plugin upload functionality
 * If you need help with any of this, please let me know!
 * Best regards,
 *  Thread Starter [Skaks](https://wordpress.org/support/users/skaks/)
 * (@skaks)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/change-login-message/#post-6807998)
 * Thanks a lot!!! Works perfectly!
    Great plugin and great support!
 * Regards.

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

The topic ‘Change login message’ is closed to new replies.

 * ![](https://ps.w.org/profile-builder/assets/icon-256x256.png?rev=2961144)
 * [User Profile Builder - Beautiful User Registration Forms, User Profiles & User Role Editor](https://wordpress.org/plugins/profile-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/profile-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/profile-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/profile-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/profile-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/profile-builder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Skaks](https://wordpress.org/support/users/skaks/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/change-login-message/#post-6807998)
 * Status: resolved