aboutsummaryrefslogtreecommitdiffstats
path: root/register.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-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]));
}