From 1cb9b17cf34a2c1eefca47938d0dd6db552ec5ed Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 17 Aug 2005 09:29:47 +0000 Subject: [PATCH] force mail attribute in inetOrgPerson for new accounts --- lam/lib/modules/kolabUser.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index 5d806551..44f775eb 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -300,6 +300,9 @@ class kolabUser extends baseModule { elseif (isset($_SESSION[$this->base]->module['inetOrgPerson']) && !$_SESSION[$this->base]->module['inetOrgPerson']->attributes['userPassword'][0]) { StatusMessage('ERROR', _("Please enter a user password on this page: %s"), '', array($_SESSION[$this->base]->module['inetOrgPerson']->get_alias())); } + if (!$_SESSION[$this->base]->module['inetOrgPerson']->attributes['mail'][0]) { + StatusMessage('ERROR', _("Please enter an email address on this page: %s"), '', array($_SESSION[$this->base]->module['inetOrgPerson']->get_alias())); + } } $return = array(); // check if account is marked for deletion @@ -622,6 +625,7 @@ class kolabUser extends baseModule { if ($_SESSION[$this->base]->isNewAccount) { if (isset($_SESSION[$this->base]->module['posixAccount']) && !$_SESSION[$this->base]->module['posixAccount']->attributes['userPassword'][0]) return false; elseif (isset($_SESSION[$this->base]->module['inetOrgPerson']) && !$_SESSION[$this->base]->module['inetOrgPerson']->attributes['userPassword'][0]) return false; + if (!$_SESSION[$this->base]->module['inetOrgPerson']->attributes['mail'][0]) return false; return $this->inputCorrect; } else {