Skip to content
Snippets Groups Projects
Commit e1fcbe1e authored by andi's avatar andi
Browse files

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
parent 5e199953
No related branches found
No related tags found
No related merge requests found
......@@ -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{
......
......@@ -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']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment