mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-06 16:53:34 +02:00
when registering a new user, we must take into account that user_category.date_last can be NULL
git-svn-id: http://piwigo.org/svn/branches/release-1_3@548 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -158,7 +158,16 @@ function register_user( $login, $password, $password_conf,
|
||||
$query = 'INSERT INTO '.PREFIX_TABLE.'user_category';
|
||||
$query.= ' (user_id,category_id,date_last,nb_sub_categories) VALUES';
|
||||
$query.= ' ('.$user_id.','.$row['category_id'];
|
||||
$query.= ",'".$row['date_last']."',".$row['nb_sub_categories'].')';
|
||||
$query.= ",";
|
||||
if (!isset($row['date_last']) or $row['date_last'] == '')
|
||||
{
|
||||
$query.= 'NULL';
|
||||
}
|
||||
else
|
||||
{
|
||||
$query.= "'".$row['date_last']."'";
|
||||
}
|
||||
$query.= ",".$row['nb_sub_categories'].')';
|
||||
$query.= ';';
|
||||
mysql_query ( $query );
|
||||
}
|
||||
@@ -216,4 +225,4 @@ function check_login_authorization()
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user