Commit b108cff9 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Fix login with LDAP,

parent c176e9fe
...@@ -268,14 +268,13 @@ class LoginPresenter @Inject constructor( ...@@ -268,14 +268,13 @@ class LoginPresenter @Inject constructor(
val token = retryIO("login") { val token = retryIO("login") {
when (loginType) { when (loginType) {
TYPE_LOGIN_USER_EMAIL -> { TYPE_LOGIN_USER_EMAIL -> {
if (usernameOrEmail.isEmail()) { when {
client.loginWithEmail(usernameOrEmail, password) settings.isLdapAuthenticationEnabled() ->
} else {
if (settings.isLdapAuthenticationEnabled()) {
client.loginWithLdap(usernameOrEmail, password) client.loginWithLdap(usernameOrEmail, password)
} else { usernameOrEmail.isEmail() ->
client.loginWithEmail(usernameOrEmail, password)
else ->
client.login(usernameOrEmail, password) client.login(usernameOrEmail, password)
}
} }
} }
TYPE_LOGIN_CAS -> { TYPE_LOGIN_CAS -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment