From 6fa03e0cca6855e041de004d49e0dd1b03bd644f Mon Sep 17 00:00:00 2001 From: gweltas Date: Fri, 3 Dec 2004 16:30:12 +0000 Subject: - User control panel update (user side) - User control panel update (admin side) - Add of registration link on the main page - Minor bug correction for group management git-svn-id: http://piwigo.org/svn/trunk@631 68402e56-0260-453c-a942-63ccdbb3a9ee --- register.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'register.php') diff --git a/register.php b/register.php index fc3332bde..f939ff3e9 100644 --- a/register.php +++ b/register.php @@ -28,21 +28,14 @@ //----------------------------------------------------------- include define('PHPWG_ROOT_PATH','./'); include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); -//-------------------------------------------------- access authorization check -if ( $conf['access'] == "restricted" ) -{ - echo $lang['only_members']; - exit(); -} //----------------------------------------------------------- user registration -$error = array(); +$errors = array(); if ( isset( $_POST['submit'] ) ) { - $error = register_user( $_POST['login'], $_POST['password'], + $errors = register_user( $_POST['login'], $_POST['password'], $_POST['password_conf'], $_POST['mail_address'] ); - if ( sizeof( $error ) == 0 ) + if ( sizeof( $errors ) == 0 ) { - $session_id = session_create( $_POST['login'] ); $url = 'category.php?id='.$session_id; redirect( $url ); } @@ -74,10 +67,10 @@ $template->assign_vars(array( )); //-------------------------------------------------------------- errors display -if ( sizeof( $error ) != 0 ) +if ( sizeof( $errors ) != 0 ) { $template->assign_block_vars('errors',array()); - for ( $i = 0; $i < sizeof( $error ); $i++ ) + for ( $i = 0; $i < sizeof( $errors ); $i++ ) { $template->assign_block_vars('errors.error',array('ERROR'=>$errors[$i])); } -- cgit v1.2.3