aboutsummaryrefslogtreecommitdiffstats
path: root/profile.php
diff options
context:
space:
mode:
Diffstat (limited to 'profile.php')
-rw-r--r--profile.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/profile.php b/profile.php
index 741fcc40e..301fba825 100644
--- a/profile.php
+++ b/profile.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
+// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
@@ -133,7 +133,7 @@ function save_profile_from_post($userdata, &$errors)
// periods must be integer values, they represents number of days
if (!preg_match($int_pattern, $_POST['recent_period'])
- or $_POST['recent_period'] <= 0)
+ or $_POST['recent_period'] < 0)
{
$errors[] = l10n('Recent period must be a positive integer value') ;
}
@@ -201,7 +201,7 @@ function save_profile_from_post($userdata, &$errors)
// password is updated only if filled
if (!empty($_POST['use_new_pwd']))
{
- array_push($fields, $conf['user_fields']['password']);
+ $fields[] = $conf['user_fields']['password'];
// password is hashed with function $conf['password_hash']
$data{$conf['user_fields']['password']} = $conf['password_hash']($_POST['use_new_pwd']);
}
@@ -211,12 +211,12 @@ function save_profile_from_post($userdata, &$errors)
{
if ($_POST['username'] != $userdata['username'] and get_userid($_POST['username']))
{
- array_push($page['errors'], l10n('this login is already used'));
+ $page['errors'][] = l10n('this login is already used');
unset($_POST['redirect']);
}
else
{
- array_push($fields, $conf['user_fields']['username']);
+ $fields[] = $conf['user_fields']['username'];
$data{$conf['user_fields']['username']} = $_POST['username'];
// send email to the user
@@ -262,7 +262,7 @@ function save_profile_from_post($userdata, &$errors)
if ($conf['activate_comments'])
{
- array_push($fields, 'show_nb_comments');
+ $fields[] = 'show_nb_comments';
}
$data = array();
@@ -304,7 +304,7 @@ function load_profile_in_template($url_action, $url_redirect, $userdata)
$template->assign(
array(
'USERNAME'=>stripslashes($userdata['username']),
- 'EMAIL'=>get_email_address_as_display_text(@$userdata['email']),
+ 'EMAIL'=>@$userdata['email'],
'ALLOW_USER_CUSTOMIZATION'=>$conf['allow_user_customization'],
'ACTIVATE_COMMENTS'=>$conf['activate_comments'],
'NB_IMAGE_PAGE'=>$userdata['nb_image_page'],