PHP
1
Вклад в тег
function custom_login() {
$user['user_login'] = $_POST['log'];
$user['user_password'] = $_POST['pwd'];
$user['remember'] = true;
$signon = wp_signon($user, false);
if (is_wp_error($signon)) echo $signon->get_error_message();
//print_r($signon);
}
add_action( 'after_setup_theme', 'custom_login' );