wp_signon redirect
-
I am using wp_signon to create a login form. My problem is that on successful login the user is directed to wp-admin which I do not want.
I thought that wp_signon returned an object but did not divert to wp_admin. This is the way it works on failure but on success the user is taken to wp-admin.
$creds['user_login'] = $_POST['username']; $creds['user_password'] = $_POST['userpassword']; $creds['remember'] = true; $user = wp_signon( $creds, false ); if ( is_wp_error($user) ) echo $user->get_error_message();The code is pretty much taken from the codex ( yes I know I could use the post variables direclty) So really do not understand why 🙂
Thanks in advance….
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘wp_signon redirect’ is closed to new replies.