summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-05-10 18:30:55 +0200
committerandi <andi@splitbrain.org>2005-05-10 18:30:55 +0200
commite1fcbe1e60657635fd4474b2fca8299b922619a4 (patch)
treebfcd7d6d56d3b841dc01eb2d5e465b376417f64e
parent5e199953f8f0dfb86624905ebf237d99e2f6bb67 (diff)
downloadrpg-e1fcbe1e60657635fd4474b2fca8299b922619a4.tar.gz
rpg-e1fcbe1e60657635fd4474b2fca8299b922619a4.tar.bz2
small fixes to register from admin page
It's AUTH_ADMIN not AUTH_AUTH ;-), Small formatting changes, removed superfluous perm check in register() darcs-hash:20050510163055-9977f-ca82569166a73bb657e82d3ffa525c1d1978f73e.gz
-rw-r--r--inc/actions.php7
-rw-r--r--inc/auth.php5
2 files changed, 4 insertions, 8 deletions
diff --git a/inc/actions.php b/inc/actions.php
index 441a85d3c..25a2e14c2 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -123,10 +123,11 @@ function act_permcheck($act){
}elseif(in_array($act,array('login','search','recent'))){
$permneed = AUTH_NONE;
}elseif($act == 'register'){
- if ($conf['openregister'])
+ if ($conf['openregister']){
$permneed = AUTH_NONE;
- else
- $permneed = AUTH_AUTH;
+ }else{
+ $permneed = AUTH_ADMIN;
+ }
}elseif($act == 'admin'){
$permneed = AUTH_ADMIN;
}else{
diff --git a/inc/auth.php b/inc/auth.php
index 0433a327c..ca6fb20de 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -365,14 +365,9 @@ function auth_sendPassword($user,$password){
*/
function register(){
global $lang;
- global $conf;
if(!$_POST['save']) return false;
- //no open register? -> only admin allowed!
- if(!$conf['openregister'] &&
- auth_quickaclcheck('') != AUTH_ADMIN ) return false;
-
//clean username
$_POST['login'] = preg_replace('/.*:/','',$_POST['login']);
$_POST['login'] = cleanID($_POST['login']);