24 public function __invoke(array $credentials): bool {
25 if (!isset($credentials[
'username']) || !isset($credentials[
'password'])) {
36 $password = (string) $credentials[
'password'];
37 $hash = (string)
$user->password_hash;
43 if (!$password_svc->verify(
$password, $hash)) {
49 if ($password_svc->needsRehash($hash)) {
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
if(parse_url(elgg_get_site_url(), PHP_URL_PATH)!== '/') if(file_exists(elgg_get_root_path(). 'robots.txt'))
Set robots.txt.
Generic parent class for login exceptions.
elgg_get_user_by_username(string $username, bool $try_email=false)
Get a user by username.
elgg_register_authentication_failure(\ElggUser $user)
Registers an authentication failure for a user.
if(!$user||!$user->canEdit()) $password
const ELGG_SHOW_DISABLED_ENTITIES
elgg_is_authentication_failure_limit_reached(\ElggUser $user, int $limit=null, int $lifetime=null)
Checks if the authentication failure limit has been reached.
PAM handler to authenticate a user based on username/password Used for the 'user' policy...
_elgg_services()
Get the global service provider.
__invoke(array $credentials)
Authenticate a user.
Login as the specified user.