aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-01-21 23:25:20 +0000
committerz0rglub <z0rglub@piwigo.org>2004-01-21 23:25:20 +0000
commit36bf4efe4d874f1c3b5f00ee208b01a576b250ae (patch)
tree1fd79ccb3100758aa1f66cda99d1506f41b59691 /include
parent54813d73b09ca960ced02775c281ddbc8cd45482 (diff)
code simplified
git-svn-id: http://piwigo.org/svn/branches/release-1_3@309 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_user.inc.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index c623cf0c7..95ca7bb3c 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -102,11 +102,10 @@ function register_user( $login, $password, $password_conf,
if ( $mail_address != '' ) $query.= ",'".$mail_address."'";
else $query.= ',NULL';
$query.= ",'".$status."'";
- for ( $i = 0; $i < sizeof( $infos ); $i++ )
- {
+ foreach ( $infos as $info ) {
$query.= ',';
- if ( $row[$infos[$i]] == '' ) $query.= 'NULL';
- else $query.= "'".$row[$infos[$i]]."'";
+ if ( !isset( $row[$info] ) ) $query.= 'NULL';
+ else $query.= "'".$row[$info]."'";
}
$query.= ');';
mysql_query( $query );