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