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 
execute_new_password_request($user_guid, $conf_code, $password=null)
Validate and change password for a user.
Definition: users.php:456
$user_guid
get_input($variable, $default=null, $filter_result=true)
Get some input from variables passed submitted through GET or POST.
Definition: input.php:27
$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:419
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
validate_password($password)
Simple validation of a password.
Definition: users.php:604
$password
const REFERER
Definition: elgglib.php:2162
login(ElggUser $user, $persistent=false)
Logs in a specified ElggUser.
Definition: sessions.php:305
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:374
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:383
$password_repeat
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:604