Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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
register_error($error)
Display an error on next page load.
Definition: elgglib.php:452
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:2029
forward($location="", $reason= 'system')
Forward to $location.
Definition: elgglib.php:93
$password_repeat
login(\ElggUser $user, $persistent=false)
Logs in a specified .
Definition: sessions.php:320
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:438
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204