summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorPatrick Brown <ptbrown@whoopdedo.org>2015-05-07 21:10:22 -0400
committerPatrick Brown <ptbrown@whoopdedo.org>2015-05-07 21:10:22 -0400
commitd0d224a82eddf30aa6daead4796cb10dd0466767 (patch)
treed04692b0379451db55b7dc556dee7be7846d3cc8 /inc/auth.php
parent699e3c4900f2d6cc860a3587a05798cd23b7944d (diff)
parentcffb4528cea1b9e7e03dc724aaa9719dbd6e23c9 (diff)
downloadrpg-d0d224a82eddf30aa6daead4796cb10dd0466767.tar.gz
rpg-d0d224a82eddf30aa6daead4796cb10dd0466767.tar.bz2
Merge branch 'master' into ioreplaceinfile
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/inc/auth.php b/inc/auth.php
index 17923ba2a..60b8c7c78 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -1006,7 +1006,7 @@ function register() {
//okay try to create the user
if(!$auth->triggerUserMod('create', array($login, $pass, $fullname, $email))) {
- msg($lang['reguexists'], -1);
+ msg($lang['regfail'], -1);
return false;
}
@@ -1098,17 +1098,18 @@ function updateprofile() {
}
}
- if($result = $auth->triggerUserMod('modify', array($INPUT->server->str('REMOTE_USER'), &$changes))) {
- // update cookie and session with the changed data
- if($changes['pass']) {
- list( /*user*/, $sticky, /*pass*/) = auth_getCookie();
- $pass = auth_encrypt($changes['pass'], auth_cookiesalt(!$sticky, true));
- auth_setCookie($INPUT->server->str('REMOTE_USER'), $pass, (bool) $sticky);
- }
- return true;
+ if(!$auth->triggerUserMod('modify', array($INPUT->server->str('REMOTE_USER'), &$changes))) {
+ msg($lang['proffail'], -1);
+ return false;
}
- return false;
+ // update cookie and session with the changed data
+ if($changes['pass']) {
+ list( /*user*/, $sticky, /*pass*/) = auth_getCookie();
+ $pass = auth_encrypt($changes['pass'], auth_cookiesalt(!$sticky, true));
+ auth_setCookie($INPUT->server->str('REMOTE_USER'), $pass, (bool) $sticky);
+ }
+ return true;
}
/**
@@ -1221,7 +1222,7 @@ function act_resendpwd() {
// change it
if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) {
- msg('error modifying user data', -1);
+ msg($lang['proffail'], -1);
return false;
}
@@ -1229,7 +1230,7 @@ function act_resendpwd() {
$pass = auth_pwgen($user);
if(!$auth->triggerUserMod('modify', array($user, array('pass' => $pass)))) {
- msg('error modifying user data', -1);
+ msg($lang['proffail'], -1);
return false;
}