N°2311 - HybridAuth Extension

This commit is contained in:
Eric
2019-08-16 18:42:04 +02:00
parent 953c9e588e
commit ce22dc9309
2 changed files with 33 additions and 0 deletions

View File

@@ -85,6 +85,16 @@ class LoginDefaultAfter extends AbstractLoginFSMExtension implements iLogoutExte
return LoginWebPage::LOGIN_FSM_RETURN_CONTINUE;
}
protected function OnCheckCredentials(&$iErrorCode)
{
if (!isset($_SESSION['login_mode']))
{
LoginWebPage::ResetSession();
exit();
}
return LoginWebPage::LOGIN_FSM_RETURN_CONTINUE;
}
/**
* Execute all actions to log out properly
*/

View File

@@ -2042,4 +2042,27 @@ class utils
return $sMimeType;
}
/**
* helper to test if a string starts with another
* @param $haystack
* @param $needle
*
* @return bool
*/
public final static function StartsWith($haystack, $needle)
{
return substr_compare($haystack, $needle, 0, strlen($needle)) === 0;
}
/**
* helper to test if a string ends with another
* @param $haystack
* @param $needle
*
* @return bool
*/
public final static function EndsWith($haystack, $needle) {
return substr_compare($haystack, $needle, -strlen($needle)) === 0;
}
}