From 85aa957de8319e6c2ca6fc39190bb7fd2c5e602d Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 26 Jun 2008 12:00:44 +0000 Subject: Fixes #91 and #97 git-svn-id: https://code.elgg.org/elgg/trunk@1143 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/user/name.php | 2 +- actions/user/password.php | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 actions/user/password.php (limited to 'actions') diff --git a/actions/user/name.php b/actions/user/name.php index 8ecfa856d..bbeed85ec 100644 --- a/actions/user/name.php +++ b/actions/user/name.php @@ -24,7 +24,7 @@ else $user = get_entity($user_id); - if ($user) + if (($user) && ($name)) { $user->name = $name; if ($user->save()) diff --git a/actions/user/password.php b/actions/user/password.php new file mode 100644 index 000000000..4c7ceb65c --- /dev/null +++ b/actions/user/password.php @@ -0,0 +1,51 @@ +=4) + { + if ($password == $password2) + { + $user->password = generate_user_password($user, $password); + if ($user->save()) + system_message(elgg_echo('user:password:success')); + else + system_message(elgg_echo('user:password:fail')); + } + else + system_message(elgg_echo('user:password:fail:notsame')); + } + else + system_message(elgg_echo('user:password:fail:tooshort')); + } + else + system_message(elgg_echo('user:password:fail')); + + forward($_SERVER['HTTP_REFERER']); + exit; +?> \ No newline at end of file -- cgit v1.2.3