From ca3a6df1c943c36a4b6eca3ad03f64d3d40b9b2c Mon Sep 17 00:00:00 2001 From: Matthias Grimm Date: Sun, 8 May 2005 12:13:44 +0200 Subject: add user registration to admin page If 'openregister' is not set the menue entry 'Add new user...' will be added to the admin page so that registering of new users is always possible through an GUI. If 'openregister is set the menu entry will be omitted to not to overload the admin page. darcs-hash:20050508101344-4145d-cb3f9e10f4b8d26dec516ce796e54ed12a1e2b53.gz --- inc/actions.php | 4 +++- inc/auth.php | 2 +- inc/html.php | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'inc') diff --git a/inc/actions.php b/inc/actions.php index 3f7cc8c94..fc68ef173 100644 --- a/inc/actions.php +++ b/inc/actions.php @@ -64,7 +64,9 @@ function act_dispatch(){ if($_REQUEST['page'] == 'acl'){ require_once(DOKU_INC.'inc/admin_acl.php'); admin_acl_handler(); - } + } elseif ($_REQUEST['page'] == 'register') { + $ACT = 'register'; + } } //call template FIXME: all needed vars available? diff --git a/inc/auth.php b/inc/auth.php index 4e3130ef7..0b40b6995 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -368,7 +368,7 @@ function register(){ global $conf; if(!$_POST['save']) return false; - if(!$conf['openregister']) return false; +// if(!$conf['openregister']) return false; //clean username $_POST['login'] = preg_replace('/.*:/','',$_POST['login']); diff --git a/inc/html.php b/inc/html.php index 9e736f702..cb076b76d 100644 --- a/inc/html.php +++ b/inc/html.php @@ -985,6 +985,7 @@ function html_debug(){ function html_admin(){ global $ID; global $lang; + global $conf; print p_locale_xhtml('admin'); @@ -992,7 +993,10 @@ function html_admin(){ // currently ACL only - more to come ptln('
  • '.$lang['admin_acl'].'
  • '); - + if (!$conf['openregister']){ + ptln('
  • '.$lang['admin_register'].'
  • '); + } + ptln(''); } -- cgit v1.2.3