Esempio n. 1
0
 public static async Task<User> ValidateLogin(string userName, string password)
 {  
         var user = await ParseUser.LogInAsync(userName.Trim(), password.Trim());
          ParseFile img = user.Get<ParseFile>("profilePic");  
          //User currentUser = new User() { Id = user.ObjectId, UserType = user.Get<int>("user_type"), Name = user.Username, Status = user.Get<string>("status"), ProfilePic = img.Url };
          User currentUser = new User() { Id = user.ObjectId, user_type = user.Get<int>("user_type"), username = user.Username, status = user.Get<string>("status"), profilePic = img.Url };
         
     return currentUser;
 }
Esempio n. 2
0
 public static async Task<User> ValidateLogin(string userName, string password)
 {
     var user = await ParseUser.LogInAsync(userName.Trim(), password.Trim());
     User currentUser = new User() { Id = user.ObjectId,user_type = user.Get<int>(MemberInfoGetting.GetMemberName(() => new User().user_type)), username = user.Username };
     return currentUser;
 }