aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-06-10 22:01:18 +0000
committerrub <rub@piwigo.org>2007-06-10 22:01:18 +0000
commite8c396c06b6f8352bc2119038b89a4a4b80c67f6 (patch)
tree6346671affcb8e276fd8501aa934aa240ff951f0 /include/functions_user.inc.php
parent3fbc92f61e1cf362982d3e9697bf5261868cbb2c (diff)
Resolved issue 0000489: Mail address obligatory
git-svn-id: http://piwigo.org/svn/trunk@2032 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r--include/functions_user.inc.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index d9e63c437..036f842d9 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -31,9 +31,10 @@
// If the mail address doesn't correspond, an error message is returned.
function validate_mail_address( $mail_address )
{
- global $lang;
+ global $lang, $conf;
- if ( $mail_address == '' )
+ if (empty($mail_address) and
+ !($conf['obligatory_user_mail_address'] and in_array(script_basename(), array('register', 'profile'))))
{
return '';
}