Title: First Login Redirection
Last modified: January 19, 2017

---

# First Login Redirection

 *  Resolved [bogdanvrg](https://wordpress.org/support/users/bogdanvrg/)
 * (@bogdanvrg)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/first-login-redirection/)
 * Hello!
 * First I want to mention that I love this plugin for it’s simplicity. Thanks a
   lot, we all should give you a beer :D!
 * I have a problem, the only one i encountered. I want to redirect users on their
   first login to a specific page and after, on other logins on homepage, profile
   whatsoever. I found this code :
 * > function function_new_user($user_id) {
   >  add_user_meta( $user_id, ‘_new_user’,‘
   > 1’ ); } add_action( ‘user_register’, ‘function_new_user’);
   > The next function will check if it’s the first login and redirect the user.
   > function function_check_login_redirect($user_login, $user) {
   >  $logincontrol
   > = get_user_meta($user->ID, ‘_new_user’, ‘TRUE’); if ( $logincontrol ) { //set
   > the user to old update_user_meta( $user->ID, ‘_new_user’, ‘0’ );
   >  //Do the redirects or whatever you need to do for the first login
   >  wp_redirect(‘
   > [http://www.example.com&#8217](http://www.example.com&#8217);, 302 ); exit;}}
   > add_action(‘wp_login’, ‘function_check_login_redirect’, 10, 2);
 * It works only with default wordpress login. What should I modify in order for
   it to work with clean login? Can you do it for me? Is there any alternative for
   this piece of code (if it isn’t good)?
 * Thanks a lot !!!!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Alberto Hornero](https://wordpress.org/support/users/hornero/)
 * (@hornero)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/first-login-redirection/#post-8839662)
 * I do not recommend to modify the plugin since when we update it you are going
   to lose the changes. I recommend you to use the filters and then override them
   from another plugin (made by you or someone) or include it in the functions.php
   file (from the theme)
 * You can use both filters: cl_login_redirect_url and cl_logout_redirect_url
 * Regards,
 * Alberto.

Viewing 1 replies (of 1 total)

The topic ‘First Login Redirection’ is closed to new replies.

 * ![](https://ps.w.org/clean-login/assets/icon-256x256.png?rev=1602118)
 * [Clean Login](https://wordpress.org/plugins/clean-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/clean-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/clean-login/)
 * [Active Topics](https://wordpress.org/support/plugin/clean-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/clean-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/clean-login/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Alberto Hornero](https://wordpress.org/support/users/hornero/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/first-login-redirection/#post-8839662)
 * Status: resolved