public async Task <ActionResult> Registry(CreateUser model) { if (!ModelState.IsValid) { ViewBag.Message = "Niepoprawne dane"; return(View()); } if (model.Password != model.PasswordConfirm) { ViewBag.Message = "Hasła nie są podobne"; return(View()); } MyUser nUser = new MyUser { Email = model.Email, UserName = model.UserName }; if (await Auth.AddUser(nUser, model.Password)) { ViewBag.Completed = true; } else { ViewBag.Completed = false; } return(View()); }
public UsersViewModel() { auth = DependencyService.Get <IAuth>(); _firebaseStorageHelper = new FirebaseStorageHelper(); _services = new DBFirebase(); AddUserCommand = new Command(async() => await auth.AddUser(Name, Age, City, Description, Gender, OppositeGender, ImageUrl = await UploadPhoto(ImageUrl))); RefreshMessages = new Command(async() => await RefreshUserMessages()); DownloadPhoto(); SelectPhotoCommand = new Command(async() => await SelectPhoto()); var test = auth.GetUserProfile(); }