public function attempt(array $credentials, $remember = false)
    {
        $credentials = array_merge($credentials, ['remember' => $remember]);

        $user = wp_signon($credentials);

        if (! is_wp_error($user)) {
            return true;
        }

        return false;
    }
public function attempt(array $credentials, $remember = false)
    {
        $credentials = array_merge($credentials, ['remember' => $remember]);

        $user = wp_signon($credentials);

        if (! is_wp_error($user)) {
            return true;
        }

        return false;
    }
public function attempt ( array $ credentials , $ remember = false ) { $ credentials = array_merge ( $ credentials , [ 'remember' => $ remember ] ) ; $ user = wp_signon ( $ credentials ) ; if ( ! is_wp_error ( $ user ) ) { return true ; } return false ; }
Attempt user login.

@param array $credentials
@param bool $remember

@return bool
Attempt user login .