62 $prev = $e->getPrevious();
67 }
elseif ($e instanceof LoginException) {
elgg_get_current_language()
Get the current system/user language or "en".
elgg_call(int $flags, Closure $closure)
Calls a callable autowiring the arguments using public DI services and applying logic based on flags...
if(empty($username)||empty($password)) if(elgg_strpos($username, '@')!==false) $user
get_user_by_email($email)
Get an array of users from an email address.
Generic parent class for login exceptions.
if(empty($user_guids)) $users
catch(AuthenticationException|LoginException $e) if(elgg_is_xhr()) $message
Thrown by the AuthenticationService.
elgg_get_session()
Gets Elgg's session object.
const ELGG_HTTP_UNAUTHORIZED
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
get_user_by_username($username)
Get user by username.
const ELGG_SHOW_DISABLED_ENTITIES
elgg_strpos()
Wrapper function for mb_strpos().
elgg_generate_url($name, array $parameters=[])
Generate a URL for named route.
elgg_get_login_forward_url(\ElggUser $user)
Determine which URL the user should be forwarded to upon successful login.
elgg_pam_authenticate(string $policy, array $authentication_params=[])
Start an authentication process.
elgg_register_error_message($options)
Registers a error system message.
const ELGG_HTTP_BAD_REQUEST
if($item instanceof\ElggEntity) elseif($item instanceof\ElggRiverItem) elseif($item instanceof ElggRelationship) elseif(is_callable([$item, 'getType']))
elgg_login(\ElggUser $user, bool $persistent=false)
Log in a user.
elgg_error_response($message= '', $forward_url=REFERRER, int $status_code=ELGG_HTTP_BAD_REQUEST)
Prepare an error response to be returned by a page or an action handler.
elgg_ok_response($content= '', $message= '', $forward_url=null, int $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
elgg_is_xhr()
Checks whether the request was requested via ajax.
Login as the specified user.
getRedirectUrl()
Get preferred redirect URL.
catch(AuthenticationException|LoginException $e) if(elgg_is_xhr()) $output