Example #1
0
 public SftpUser(CISite site, string fullName, string email, bool active, string path)
 {
     FullName = fullName;
     Email    = email;
     Active   = active;
     Path     = path;
     Folder   = path.Substring((site.GetRootFolder().Length) - 1).Replace(@"\", "/");
     Password = site.CreateComplexPassword(Email);
 }
Example #2
0
 public SftpUser NewUser(DataRow dr)
 {
     return(new SftpUser
     {
         FullName = String.Format("{0} ({1}) - {2}", dr.Field <string>(2), dr.Field <string>(3), dr.Field <string>(1)),
         Email = dr.Field <string>(0),
         Active = true,
         Path = dr.Field <string>(4),
         Folder = dr.Field <string>(4).Substring((_site.GetRootFolder().Length) - 1).Replace(@"\", "/"),
         Password = _site.CreateComplexPassword(dr.Field <string>(0)),
     });
 }