Title: %userlogin% functionality
Last modified: August 30, 2016

---

# %userlogin% functionality

 *  [Peter M.](https://wordpress.org/support/users/inveress/)
 * (@inveress)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/userlogin-functionality/)
 * I wanted to use the user’s login name (‘fredsmith’) to create custom URLs but
   the plugin doesn’t seem to support it – am I missing something?
 * I added the functionality myself by editing /includes/class-sidebar-login-widget.
   php and changing the replace_tags function:
 * From line 99:
 *     ```
       $text = str_replace(
       	array( '%username%', '%userid%', '%userlogin%', '%firstname%', '%lastname%', '%name%' ),
       	array(
       		ucwords( $this->user->display_name ),
       		$this->user->ID,
       		$this->user->user_login,
       		$this->user->first_name,
       		$this->user->last_name,
       		trim( $this->user->first_name . ' ' . $this->user->last_name )
       	),
           	$text
       );
       ```
   
 * Now you can use %userlogin% to use the user’s login.
 * This is in plugin version 2.7.2.
 * Peter.
 * [https://wordpress.org/plugins/sidebar-login/](https://wordpress.org/plugins/sidebar-login/)

Viewing 1 replies (of 1 total)

 *  [blackdog7](https://wordpress.org/support/users/blackdog7/)
 * (@blackdog7)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/userlogin-functionality/#post-6676853)
 * very nice!
    I’d like the same thing, but width the nickname variable. This variable
   is in the wp_usermeta table. How can I add this?

Viewing 1 replies (of 1 total)

The topic ‘%userlogin% functionality’ is closed to new replies.

 * ![](https://ps.w.org/sidebar-login/assets/icon.svg?rev=2396264)
 * [Sidebar Login](https://wordpress.org/plugins/sidebar-login/)
 * [Support Threads](https://wordpress.org/support/plugin/sidebar-login/)
 * [Active Topics](https://wordpress.org/support/plugin/sidebar-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sidebar-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sidebar-login/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [blackdog7](https://wordpress.org/support/users/blackdog7/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/userlogin-functionality/#post-6676853)
 * Status: not resolved