Пример #1
0
        public ContactDTO SearchUserContactByUsername(string username)
        {
            var contact = LoginHelperService
                          .GetCurrentUser()
                          .Contacts
                          .FirstOrDefault(o => o.Username.ToLower() == username.ToLower());

            return(contact);
        }
Пример #2
0
        public IAccount SignInUser(LoginDTO user)
        {
            var searchedUser = _accountsDB
                               .Read()
                               ?.FirstOrDefault(o =>
                                                o.User.Email == user.Email || o.Username == user.UserName &&
                                                o.Password == user.Password);

            if (searchedUser != null)
            {
                LoginHelperService.LoginUser(searchedUser);
            }
            return(searchedUser);
        }
Пример #3
0
 public void SignOutUser()
 {
     LoginHelperService.LogOutUser();
 }