Revision 558:34bbc90b8fb1 src/gr/ebs/gss/server/ejb/ExternalAPIBean.java

b/src/gr/ebs/gss/server/ejb/ExternalAPIBean.java
2641 2641
	}
2642 2642

  
2643 2643
	@Override
2644
	public void createLdapUser(String username, String name, String email, String password) {
2644
	public void createLdapUser(String username, String firstname, String lastname, String email, String password) {
2645 2645
		LDAPConnection lc = new LDAPConnection();
2646 2646
        LDAPAttributeSet attributeSet = new LDAPAttributeSet();
2647 2647
        attributeSet.add(new LDAPAttribute("objectClass",
2648 2648
        		getConfiguration().getString("objectClass")));
2649 2649
        attributeSet.add(new LDAPAttribute("uid", username));
2650
        attributeSet.add(new LDAPAttribute("cn", new String[]{name}));
2651
        attributeSet.add(new LDAPAttribute("sn", name)); // XXX
2650
        attributeSet.add(new LDAPAttribute("cn", new String[]{firstname + " " + lastname}));
2651
        attributeSet.add(new LDAPAttribute("sn", lastname));
2652
        attributeSet.add(new LDAPAttribute("givenName", firstname));
2652 2653
        attributeSet.add(new LDAPAttribute("mail", email));
2653 2654
        attributeSet.add(new LDAPAttribute("userPassword", password));
2654 2655
        String dn = "uid=" + username + "," + getConfiguration().getString("baseDn");

Also available in: Unified diff