WaveBox.Core.Model.User.CreateSession C# (CSharp) Method

CreateSession() public method

public CreateSession ( string password, string clientName ) : bool
password string
clientName string
return bool
        public bool CreateSession(string password, string clientName)
        {
            // On successful authentication, create session!
            if (this.Authenticate(password))
            {
                Session s = Injection.Kernel.Get<ISessionRepository>().CreateSession(Convert.ToInt32(UserId), clientName);
                if (s != null)
                {
                    SessionId = s.SessionId;
                    return true;
                }
            }

            return false;
        }