summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2011-02-22 23:04:53 +0000
committerAnika Henke <anika@selfthinker.org>2011-02-22 23:04:53 +0000
commit3a48618a538412994ec244d5a9fde5c4a6161d10 (patch)
tree0ec52d772713d4e5839a2f90b8e5ecf0fa6a37e9 /inc/auth.php
parentd012ef7d2a1019a89c7fbd8c2479d7c1ed10b526 (diff)
downloadrpg-3a48618a538412994ec244d5a9fde5c4a6161d10.tar.gz
rpg-3a48618a538412994ec244d5a9fde5c4a6161d10.tar.bz2
improved actionOK and its use
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php13
1 files changed, 3 insertions, 10 deletions
diff --git a/inc/auth.php b/inc/auth.php
index 7449fd635..164ad3df9 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -686,9 +686,8 @@ function register(){
global $conf;
global $auth;
- if (!$auth) return false;
if(!$_POST['save']) return false;
- if(!$auth->canDo('addUser')) return false;
+ if(!actionOK('register')) return false;
//clean username
$_POST['login'] = trim($auth->cleanUser($_POST['login']));
@@ -764,12 +763,10 @@ function updateprofile() {
global $lang;
global $auth;
- if (!$auth) return false;
if(empty($_POST['save'])) return false;
if(!checkSecurityToken()) return false;
- // should not be able to get here without Profile being possible...
- if(!$auth->canDo('Profile')) {
+ if(!actionOK('profile')) {
msg($lang['profna'],-1);
return false;
}
@@ -840,11 +837,7 @@ function act_resendpwd(){
global $conf;
global $auth;
- if(!actionOK('resendpwd')) return false;
- if (!$auth) return false;
-
- // should not be able to get here without modPass being possible...
- if(!$auth->canDo('modPass')) {
+ if(!actionOK('resendpwd')) {
msg($lang['resendna'],-1);
return false;
}