Beispiel #1
0
		public IdentityResult RegisterUser(UserModel userModel) {
			IdentityUser user = new IdentityUser {
				UserName = userModel.UserName
			};

			var result = _userManager.Create(user, userModel.Password);

			if (result.Succeeded) {
				// TODO: ?!?!?
				this.userService.Create(user.Id, user.UserName, userModel.Email, "en-GB", "whatnot");
			}

			return result;
		}
Beispiel #2
0
		public HttpResponseMessage Register(UserModel userModel) {
			IdentityResult result = _repo.RegisterUser(userModel);
			return this.Request.CreateResponse<String>("ok");
		}