Resolved issue 0000489: Mail address obligatory

git-svn-id: http://piwigo.org/svn/trunk@2032 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2007-06-10 22:01:18 +00:00
parent 3fbc92f61e
commit e8c396c06b
9 changed files with 80 additions and 14 deletions

View file

@ -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 '';
}