Project

General

Profile

« Previous | Next » 

Revision 8478

Added by Jing Tao almost 11 years ago

Add the code to handle the organization name.

View differences:

src/edu/ucsb/nceas/metacat/authentication/AuthFile.java
456 456
     * @param groups  the groups the user belong to. The group should exist in the file
457 457
     * @param password  the password of the user
458 458
     */
459
    public void addUser(String dn, String[] groups, String plainPass, String hashedPass, String email, String surName, String givenName) throws AuthenticationException{
459
    public void addUser(String dn, String[] groups, String plainPass, String hashedPass, String email, String surName, String givenName, String organization) throws AuthenticationException{
460 460
       User user = new User();
461 461
       user.setDN(dn);
462 462
       user.setGroups(groups);
......
465 465
       user.setEmail(email);
466 466
       user.setSurName(surName);
467 467
       user.setGivenName(givenName);
468
       user.setOrganization(organization);
468 469
       user.serialize();
469 470
    }
470 471
    
......
912 913
                  if(givenName != null && !givenName.trim().equals("")) {
913 914
                      userpassword.addProperty(USERS+SLASH+USER+"["+AT+DN+"='"+dn+"']"+" "+GIVENNAME, givenName);
914 915
                  }
916
                  
917
                  if(organization != null && !organization.trim().equals("")) {
918
                      userpassword.addProperty(USERS+SLASH+USER+"["+AT+DN+"='"+dn+"']"+" "+ORGANIZATION, organization);
919
                  }
915 920

  
916 921
                  if(groups != null) {
917 922
                      for(int i=0; i<groups.length; i++) {

Also available in: Unified diff