summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/imagemaster/db/LdapUser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/imagemaster/db/LdapUser.java')
-rw-r--r--src/main/java/org/openslx/imagemaster/db/LdapUser.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/org/openslx/imagemaster/db/LdapUser.java b/src/main/java/org/openslx/imagemaster/db/LdapUser.java
index a887640..f9554c0 100644
--- a/src/main/java/org/openslx/imagemaster/db/LdapUser.java
+++ b/src/main/java/org/openslx/imagemaster/db/LdapUser.java
@@ -47,16 +47,15 @@ public class LdapUser extends User
/**
* Query LDAP for user with given login
*
- * @param login Login of user in the form "user@organization.com"
+ * @param login Login of user in the form "prefix_username"
* @return instance of LDAPUser for matching entry from LDAP or null if sth went wrong
*/
public static LdapUser forLogin( final String login, final String password ) throws AuthenticationException
{
String username, organization, firstName, lastName, eMail, satelliteAddress;
-
-// String[] temp = login.split( "@" );
-// if ( temp.length != 2 )
-// throw new AuthenticationException( AuthenticationError.GENERIC_ERROR, "Login must be in form user@organization.com" );
+
+ if (login.split( "_" ).length != 2)
+ throw new AuthenticationException(AuthenticationError.GENERIC_ERROR, "Login must be in form: prefix_username");
LdapConnection connection = null;
try {