fixed problem with message about missing password
This commit is contained in:
parent
bdfc261693
commit
6044fa1f48
|
@ -263,13 +263,17 @@ class kolabUser extends baseModule {
|
||||||
*/
|
*/
|
||||||
function display_html_attributes(&$post) {
|
function display_html_attributes(&$post) {
|
||||||
if ($_SESSION[$this->base]->isNewAccount) {
|
if ($_SESSION[$this->base]->isNewAccount) {
|
||||||
if (isset($_SESSION[$this->base]->module['posixAccount']) && !$_SESSION[$this->base]->module['posixAccount']->attributes['userPassword'][0]) {
|
if (isset($_SESSION[$this->base]->module['posixAccount'])) {
|
||||||
|
if (!$_SESSION[$this->base]->module['posixAccount']->attributes['userPassword'][0]) {
|
||||||
StatusMessage('ERROR', _("Please enter a user password on this page: %s"), '', array($_SESSION[$this->base]->module['posixAccount']->get_alias()));
|
StatusMessage('ERROR', _("Please enter a user password on this page: %s"), '', array($_SESSION[$this->base]->module['posixAccount']->get_alias()));
|
||||||
}
|
}
|
||||||
elseif (isset($_SESSION[$this->base]->module['inetOrgPerson']) && !$_SESSION[$this->base]->module['inetOrgPerson']->attributes['userPassword'][0]) {
|
}
|
||||||
|
elseif (isset($_SESSION[$this->base]->module['inetOrgPerson'])) {
|
||||||
|
if (!$_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()));
|
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]) {
|
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()));
|
StatusMessage('ERROR', _("Please enter an email address on this page: %s"), '', array($_SESSION[$this->base]->module['inetOrgPerson']->get_alias()));
|
||||||
}
|
}
|
||||||
|
@ -586,8 +590,12 @@ class kolabUser extends baseModule {
|
||||||
function module_complete() {
|
function module_complete() {
|
||||||
if (!$_SESSION[$this->base]->module['inetOrgPerson']->attributes['mail'][0]) return false;
|
if (!$_SESSION[$this->base]->module['inetOrgPerson']->attributes['mail'][0]) return false;
|
||||||
if ($_SESSION[$this->base]->isNewAccount) {
|
if ($_SESSION[$this->base]->isNewAccount) {
|
||||||
if (isset($_SESSION[$this->base]->module['posixAccount']) && !$_SESSION[$this->base]->module['posixAccount']->attributes['userPassword'][0]) return false;
|
if (isset($_SESSION[$this->base]->module['posixAccount'])) {
|
||||||
if (isset($_SESSION[$this->base]->module['inetOrgPerson']) && !$_SESSION[$this->base]->module['inetOrgPerson']->attributes['userPassword'][0]) return false;
|
if (!$_SESSION[$this->base]->module['posixAccount']->attributes['userPassword'][0]) return false;
|
||||||
|
}
|
||||||
|
elseif (isset($_SESSION[$this->base]->module['inetOrgPerson'])) {
|
||||||
|
if (!$_SESSION[$this->base]->module['inetOrgPerson']->attributes['userPassword'][0]) return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue