currentClient = sessionManager
.getClientByStreamId(current.getClient().getId(), null);
// LDAP Loggedin Users cannot use the permanent Login Flag
LdapConfig ldapConfig = ldapConfigDao.get(ldapConfigId);
String ldapLogin = usernameOrEmail;
if (ldapConfig.getAddDomainToUserName() != null
&& ldapConfig.getAddDomainToUserName()) {
ldapLogin = usernameOrEmail + "@" + ldapConfig.getDomain();
}
o = ldapLoginManagement.doLdapLogin(ldapLogin,
Userpass, currentClient, current.getClient(), SID,
ldapConfig.getConfigFileName());
} else {
currentClient = sessionManager.getClientByStreamId(current.getClient().getId(), null);
o = userManager.loginUser(SID, usernameOrEmail, Userpass,