diff options
author | Michael Klier <chi@chimeric.de> | 2008-11-17 16:44:09 +0100 |
---|---|---|
committer | Michael Klier <chi@chimeric.de> | 2008-11-17 16:44:09 +0100 |
commit | 25b2a98c678f2fdf4d665b0bf28b1be559032414 (patch) | |
tree | ea8ed45634a40e260a9cc38510b34f3340e5aa7e | |
parent | 0664e680351f00b66570479ae0f320f230b5091c (diff) | |
download | rpg-25b2a98c678f2fdf4d665b0bf28b1be559032414.tar.gz rpg-25b2a98c678f2fdf4d665b0bf28b1be559032414.tar.bz2 |
show update profile dialog only when logged in
darcs-hash:20081117154409-23886-d0ad833c6bcf96bcc54f6998397de90ff07b7686.gz
-rw-r--r-- | inc/actions.php | 12 | ||||
-rw-r--r-- | inc/auth.php | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/inc/actions.php b/inc/actions.php index 694f78208..735179968 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -68,9 +68,15 @@ function act_dispatch(){ } //update user profile - if (($ACT == 'profile') && updateprofile()) { - msg($lang['profchanged'],1); - $ACT = 'show'; + if ($ACT == 'profile') { + if(!$_SERVER['REMOTE_USER']) { + $ACT = 'login'; + } else { + if(updateprofile()) { + msg($lang['profchanged'],1); + $ACT = 'show'; + } + } } //save diff --git a/inc/auth.php b/inc/auth.php index 9c21fcbef..18f1ece89 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -724,6 +724,7 @@ function updateprofile() { if ($changes['pass']) $pass = PMA_blowfish_encrypt($changes['pass'],auth_cookiesalt()); auth_setCookie($_SERVER['REMOTE_USER'],$pass,(bool)$sticky); + return true; } } |