BinaryStudio.TaskManager.Logic.Core.UserProcessor.LogOnUser C# (CSharp) Метод

LogOnUser() публичный Метод

The log on user.
public LogOnUser ( string userName, string password ) : bool
userName string /// The user name. ///
password string /// The password. ///
Результат bool
        public bool LogOnUser(string userName, string password)
        {
            var user = this.userRepository.GetByName(userName);
            if (user == null)
            {
                return false;
            }

            if (this.cryptoProvider.ComparePassword(user.Credentials.Passwordhash, user.Credentials.Salt, password) && user.Credentials.IsVerify)
            {
                FormsAuthentication.SetAuthCookie(user.UserName, true);
                return true;
            }

            return false;
        }