function login_link_submitted() { $return = $this->login(); // If ther account was not connected, and we have register on login enabled, do that if (is_wp_error($return) && in_array($return->get_error_code(), array('twitter-account-not-connected', 'facebook-account-not-connected')) && defined('HMA_SSO_REGISTER_ACCOUNT_ON_LOGIN') && HMA_SSO_REGISTER_ACCOUNT_ON_LOGIN) { hm_clear_messages('login'); $return = $this->register(); hm_clear_messages('register'); } do_action('hma_sso_login_attempt_completed', &$this, $return); hma_do_login_redirect($return); }
/** * Catch the submitted login form and log the user in. * * @return null */ function hma_login_submitted() { $return = hma_log_user_in(array('username' => $_POST['user_login'], 'password' => $_POST['user_pass'], 'remember' => !empty($_POST['remember']) ? true : false)); hma_do_login_redirect($return); }