public void AddStaff(SignUp staff) { var user = new Staff() { Firstname = staff.FirstName, Lastname = staff.LastName, In = null, Out = null, IsOut = false, Location = "Melbourne kOffice" }; using (var db = _documentStore.OpenSession()) { db.Store(user); db.SaveChanges(); } }
public SignIn SignUp(SignUp model) { var salt = SecurityHelper.GenerateSalt(); var passwordHash = SecurityHelper.GeneratePasswordHash(model.Password+salt); var securityToken = SecurityHelper.GenerateSecurityToken(); var user = new User(model.Email, passwordHash) { Salt = salt, FirstName = model.FirstName, LastName = model.LastName, Token = securityToken }; using (var db = _documentStore.OpenSession()) { db.Store(user); db.SaveChanges(); } return SignInUser(user); }
public SignIn SignUp(SignUp model) { return _accountService.SignUp(model); }
public void AddUser(SignUp model) { _intranetService.AddStaff(model); }