mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Fix coding style
This commit is contained in:
parent
86ad5f738b
commit
57f3023ec4
@ -160,7 +160,7 @@ class LdapBackendForm extends BaseBackendForm
|
|||||||
*/
|
*/
|
||||||
public function isValidAuthenticationBackend()
|
public function isValidAuthenticationBackend()
|
||||||
{
|
{
|
||||||
if (!ResourceFactory::ldapAvailable()) {
|
if (! ResourceFactory::ldapAvailable()) {
|
||||||
/*
|
/*
|
||||||
* It should be possible to run icingaweb without the php ldap extension, when
|
* It should be possible to run icingaweb without the php ldap extension, when
|
||||||
* no ldap backends are needed. When the user tries to create an ldap backend
|
* no ldap backends are needed. When the user tries to create an ldap backend
|
||||||
@ -187,7 +187,7 @@ class LdapBackendForm extends BaseBackendForm
|
|||||||
*/
|
*/
|
||||||
} catch (Exception $exc) {
|
} catch (Exception $exc) {
|
||||||
$this->addErrorMessage(
|
$this->addErrorMessage(
|
||||||
t('Connection Validation Failed: ' . $exc->getMessage())
|
t('Connection Validation Failed: ' . $exc->getMessage())
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -91,20 +91,24 @@ class LdapUserBackend extends UserBackend
|
|||||||
{
|
{
|
||||||
$q = $this->conn->select()->from($this->userClass);
|
$q = $this->conn->select()->from($this->userClass);
|
||||||
$result = $q->fetchRow();
|
$result = $q->fetchRow();
|
||||||
if (!isset($result)) {
|
if (! isset($result)) {
|
||||||
throw new AuthenticationException(
|
throw new AuthenticationException(
|
||||||
sprintf('No objects with objectClass="%s" in DN="%s" found.',
|
sprintf(
|
||||||
$this->userClass,
|
'No objects with objectClass="%s" in DN="%s" found.',
|
||||||
$this->conn->getDN()
|
$this->userClass,
|
||||||
));
|
$this->conn->getDN()
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($result->{$this->userNameAttribute})) {
|
if (! isset($result->{$this->userNameAttribute})) {
|
||||||
throw new AuthenticationException(
|
throw new AuthenticationException(
|
||||||
sprintf('UserNameAttribute "%s" not existing in objectClass="%s"',
|
sprintf(
|
||||||
|
'UserNameAttribute "%s" not existing in objectClass="%s"',
|
||||||
$this->userNameAttribute,
|
$this->userNameAttribute,
|
||||||
$this->userClass
|
$this->userClass
|
||||||
));
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user