Run php-cs-fixer on the code base
This commit is contained in:
@@ -217,7 +217,6 @@ class Ldap extends Base
|
||||
$result = $this->findUser($username, $password);
|
||||
|
||||
if (is_array($result)) {
|
||||
|
||||
$user = $this->user->getByUsername($username);
|
||||
|
||||
if (! empty($user)) {
|
||||
@@ -226,14 +225,12 @@ class Ldap extends Base
|
||||
if ($user['is_ldap_user'] == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
// We create automatically a new user
|
||||
if ($this->isLdapAccountCreationEnabled() && $this->user->create($result) !== false) {
|
||||
$user = $this->user->getByUsername($username);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -319,12 +316,10 @@ class Ldap extends Base
|
||||
if ($this->getLdapBindType() === 'user') {
|
||||
$ldap_username = sprintf($this->getLdapUsername(), $username);
|
||||
$ldap_password = $password;
|
||||
}
|
||||
else if ($this->getLdapBindType() === 'proxy') {
|
||||
} elseif ($this->getLdapBindType() === 'proxy') {
|
||||
$ldap_username = $this->getLdapUsername();
|
||||
$ldap_password = $this->getLdapPassword();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$ldap_username = null;
|
||||
$ldap_password = null;
|
||||
}
|
||||
@@ -486,11 +481,9 @@ class Ldap extends Base
|
||||
{
|
||||
if (! empty($username) && ! empty($email)) {
|
||||
return '(&('.$this->getLdapUserPattern($username).')('.$this->getLdapAccountEmail().'='.$email.'))';
|
||||
}
|
||||
else if (! empty($username)) {
|
||||
} elseif (! empty($username)) {
|
||||
return $this->getLdapUserPattern($username);
|
||||
}
|
||||
else if (! empty($email)) {
|
||||
} elseif (! empty($email)) {
|
||||
return '('.$this->getLdapAccountEmail().'='.$email.')';
|
||||
}
|
||||
|
||||
@@ -508,7 +501,7 @@ class Ldap extends Base
|
||||
*/
|
||||
private function getEntry(array $entries, $key, $default = '')
|
||||
{
|
||||
return isset($entries[0][$key][0]) ? $entries[0][$key][0] : $default;
|
||||
return isset($entries[0][$key][0]) ? $entries[0][$key][0] : $default;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -522,6 +515,6 @@ class Ldap extends Base
|
||||
*/
|
||||
private function getEntries(array $entries, $key, $default = array())
|
||||
{
|
||||
return isset($entries[0][$key]) ? $entries[0][$key] : $default;
|
||||
return isset($entries[0][$key]) ? $entries[0][$key] : $default;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ class RememberMe extends Base
|
||||
$credentials = $this->readCookie();
|
||||
|
||||
if ($credentials !== false) {
|
||||
|
||||
$record = $this->find($credentials['token'], $credentials['sequence']);
|
||||
|
||||
if ($record) {
|
||||
@@ -144,7 +143,6 @@ class RememberMe extends Base
|
||||
$credentials = $this->readCookie();
|
||||
|
||||
if ($credentials !== false) {
|
||||
|
||||
$this->deleteCookie();
|
||||
|
||||
$this->db
|
||||
|
||||
Reference in New Issue
Block a user