Ignore:
Timestamp:
05/05/09 14:55:10 (12 years ago)
Author:
asimon
Message:

error correction (ticket #537)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Security.Contracts/3.2/BusinessObjects/User.cs

    r1737 r1738  
    3030  [DataContract]
    3131  public class User : PermissionOwner {
     32
     33    [DataMember]
     34    public String Login { get; set; }
     35
     36    private String password;
     37   
     38    [DataMember]
     39    public String Password {
     40      get {
     41        return this.password;
     42      }
     43      protected set {
     44        this.password = value;
     45      }
     46    }
     47
     48    [DataMember]
     49    public String MailAddress { get; set; }
     50
     51    public void SetPlainPassword(String password) {
     52      this.password = password;
     53    }
     54
     55    public void SetHashedPassword(String password) {
     56      this.password = getMd5Hash(password);
     57    }
     58
    3259    private static string getMd5Hash(string input) {
    3360      // Create a new instance of the MD5CryptoServiceProvider object.
     
    5077      return sBuilder.ToString();
    5178    }
    52 
    53 
    54     [DataMember]
    55     public String Login { get; set; }
    56 
    57     private String password;
    58    
    59     [DataMember]
    60     public String Password {
    61       get {
    62         return this.password;
    63       }
    64       set {
    65         this.password = getMd5Hash(value);
    66       }
    67     }
    68 
    69     public void SetPlainPassword(String password) {
    70       this.password = password;
    71     }
    72 
    73     [DataMember]
    74     public String MailAddress { get; set; }
    7579  }
    7680}
Note: See TracChangeset for help on using the changeset viewer.