fixed syntax errors

This commit is contained in:
Roland Gruber 2007-10-05 17:35:16 +00:00
parent 98189841b5
commit 95a9599038
2 changed files with 5 additions and 5 deletions

View File

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

View File

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