When a user is trying to login for the first time, he is always redirect to his profile. Is it possible to just redirect the user to the frontend home page?
http://wordpress.org/extend/plugins/active-directory-integration/
When a user is trying to login for the first time, he is always redirect to his profile. Is it possible to just redirect the user to the frontend home page?
http://wordpress.org/extend/plugins/active-directory-integration/
Use this in functions.php:
// redirect the users on login to the homepage (otherwise they go to the profile page, you don't want that)
add_filter( 'login_redirect', 'my_login_redirect', 10, 3 );
function my_login_redirect( $redirect_to, $request, $user ) {
// Is there a user?
if ( is_array( $user->roles ) ) {
// Is it an administrator?
if ( in_array( 'administrator', $user->roles ) )
return home_url( '/wp-admin/' );
else
return home_url();
// return get_permalink( 83 );
}
}You can try the plugin "Peters's Login Redirect": http://wordpress.org/extend/plugins/peters-login-redirect/
You must log in to post.