Elgg  Version 1.9
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'));
29 } else {
30  register_error(elgg_echo('user:password:fail'));
31 }
32 
33 forward();
34 
$user_guid
$password
$password_repeat
register_error($error)
Display an error on next page load.
Definition: elgglib.php:605
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:592
const REFERER
Definition: elgglib.php:2162
forward($location="", $reason='system')
Forward to $location.
Definition: elgglib.php:79
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:604
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
login(ElggUser $user, $persistent=false)
Logs in a specified ElggUser.
Definition: sessions.php:305
execute_new_password_request($user_guid, $conf_code, $password=null)
Validate and change password for a user.
Definition: users.php:456
validate_password($password)
Simple validation of a password.
Definition: users.php:604
$e
Definition: metadata.php:12