aboutsummaryrefslogtreecommitdiffstats
path: root/register.php
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2004-12-03 16:30:12 +0000
committergweltas <gweltas@piwigo.org>2004-12-03 16:30:12 +0000
commit6fa03e0cca6855e041de004d49e0dd1b03bd644f (patch)
treeae05c6a88f896de2ab4ffea8d98641f1996e2be3 /register.php
parentb35dc19ab6da173cc663e49cb32389d7e6dbfdee (diff)
- 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
Diffstat (limited to 'register.php')
-rw-r--r--register.php17
1 files changed, 5 insertions, 12 deletions
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]));
}