diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index 10d85e90..1ee55c38 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -261,12 +261,12 @@ class kolabUser extends baseModule { */ function display_html_attributes() { if ($this->getAccountContainer()->isNewAccount) { - if (isset($this->getAccountContainer()->getAccountModule('posixAccount'))) { + if ($this->getAccountContainer()->getAccountModule('posixAccount') != null) { if (!$this->getAccountContainer()->getAccountModule('posixAccount')->attributes['userPassword'][0]) { StatusMessage('ERROR', _("Please enter a user password on this page: %s"), '', array($this->getAccountContainer()->getAccountModule('posixAccount')->get_alias())); } } - elseif (isset($this->getAccountContainer()->getAccountModule('inetOrgPerson'))) { + elseif ($this->getAccountContainer()->getAccountModule('inetOrgPerson') != null) { if (!$this->getAccountContainer()->getAccountModule('inetOrgPerson')->attributes['userPassword'][0]) { StatusMessage('ERROR', _("Please enter a user password on this page: %s"), '', array($this->getAccountContainer()->getAccountModule('inetOrgPerson')->get_alias())); } @@ -583,10 +583,10 @@ class kolabUser extends baseModule { function module_complete() { if (!$this->getAccountContainer()->getAccountModule('inetOrgPerson')->attributes['mail'][0]) return false; if ($this->getAccountContainer()->isNewAccount) { - if (isset($this->getAccountContainer()->getAccountModule('posixAccount'))) { + if ($this->getAccountContainer()->getAccountModule('posixAccount') != null) { if (!$this->getAccountContainer()->getAccountModule('posixAccount')->attributes['userPassword'][0]) return false; } - elseif (isset($this->getAccountContainer()->getAccountModule('inetOrgPerson'))) { + elseif ($this->getAccountContainer()->getAccountModule('inetOrgPerson') != null) { if (!$this->getAccountContainer()->getAccountModule('inetOrgPerson')->attributes['userPassword'][0]) return false; } } diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index aa0e1b20..38de4b45 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -676,7 +676,7 @@ class posixAccount extends baseModule { if (($this->get_scope() == 'host') && (substr($_POST['uid'], -1, 1) == '$')) { $this->attributes['cn'][0] = substr($_POST['uid'], 0, strlen($_POST['uid']) - 1); } - elseif (isset($this->getAccountContainer()->getAccountModule('inetOrgPerson'))) { + elseif ($this->getAccountContainer()->getAccountModule('inetOrgPerson') != null) { if ($this->getAccountContainer()->getAccountModule('inetOrgPerson')->attributes['givenName'][0]) { $this->attributes['cn'][0] = $this->getAccountContainer()->getAccountModule('inetOrgPerson')->attributes['givenName'][0] . " " . $this->getAccountContainer()->getAccountModule('inetOrgPerson')->attributes['sn'][0]; }