* EMail(Admin): inetOrgPerson schema support reported all accounts as inactive

because there is also no MAIL_ALIAS attribute, we have to use "mail" attribute to check if user has at least one email address set
This commit is contained in:
Ralf Becker 2014-03-15 09:44:18 +00:00
parent 3a901f8196
commit ca9ca40cc2

View File

@ -378,11 +378,13 @@ class emailadmin_smtp_ldap extends emailadmin_smtp
{
$accountStatus = isset($values[static::MAIL_ENABLE_ATTR]) &&
(static::MAIL_ENABLED && !strcasecmp($values[static::MAIL_ENABLE_ATTR][0], static::MAIL_ENABLED) ||
!static::MAIL_ENABLED && $values[static::ALIAS_ATTR]['count'] > 0) ? emailadmin_smtp::MAIL_ENABLED : '';
!static::MAIL_ENABLED && $values[static::ALIAS_ATTR ? static::ALIAS_ATTR : 'mail']['count'] > 0) ?
emailadmin_smtp::MAIL_ENABLED : '';
}
else
{
$accountStatus = $values[static::ALIAS_ATTR]['count'] > 0 ? emailadmin_smtp::MAIL_ENABLED : '';
$accountStatus = $values[static::ALIAS_ATTR ? static::ALIAS_ATTR : 'mail']['count'] > 0 ?
emailadmin_smtp::MAIL_ENABLED : '';
}
if (static::FORWARD_ONLY_ATTR)
{