You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the "password protected" plugin that will force users to login using a custom form and a custom password. I use this plugin to prevent access to the whole site from unwanted users.
Once done, if the first custom password management login is successfull, the code will signon on users accordingly:
/* begin my code */
$creds = array();
$creds['user_login'] = 'username';
$creds['user_password'] = 'thepassword';
$creds['remember'] = true;
$user = wp_signon( $creds, false );
if ( is_wp_error($user) )
echo $user->get_error_message();
// run it before the headers and cookies are sent
add_action( 'after_setup_theme', 'custom_login' );
/* end my code */
The text was updated successfully, but these errors were encountered:
As reported in support forums
The text was updated successfully, but these errors were encountered: