Elgg  Version 2.3
changepassword.php
Go to the documentation of this file.
1 <?php
9 $password = get_input('password1');
10 $password_repeat = get_input('password2');
13 
14 try {
16 } catch(RegistrationException $e) {
17  register_error($e->getMessage());
19 }
20 
22  register_error(elgg_echo('RegistrationException:PasswordMismatch'));
24 }
25 
27  system_message(elgg_echo('user:password:success'));
28 
29  try {
31  } catch (LoginException $e) {
32  register_error($e->getMessage());
34  }
35 } else {
36  register_error(elgg_echo('user:password:fail'));
37 }
38 
39 forward();
40 
execute_new_password_request($user_guid, $conf_code, $password=null)
Validate and change password for a user.
Definition: users.php:180
$user_guid
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$e
Definition: metadata.php:12
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
validate_password($password)
Simple validation of a password.
Definition: users.php:267
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
$password
const REFERER
Definition: elgglib.php:2123
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:390
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
$password_repeat
login(\ElggUser $user, $persistent=false)
Logs in a specified .
Definition: sessions.php:320
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204