Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="userKey"></param>
        /// <param name="password"></param>
        /// <param name="info"></param>
        /// <param name="userPassport"></param>
        /// <returns></returns>
        public static bool SignIn(string userKey, string password, SignedInLog info, out UserPassport userPassport)
        {
            bool verified = SignIn(userKey, password, out userPassport);

            if (verified && null != userPassport && null != info)
            {
                info.PassportId = userPassport.PassportId;
                info.Save();
            }
            return(verified);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="passportId"></param>
        /// <param name="info"></param>
        /// <param name="userPassport"></param>
        /// <returns></returns>
        public static bool SignIn(long passportId, SignedInLog info, out UserPassport userPassport)
        {
            userPassport = UserPassport.FindById(passportId);
            bool verified = null != userPassport;

            if (verified)
            {
                userPassport.SignIn();
                if (null != info)
                {
                    info.PassportId = userPassport.PassportId;
                    info.Save();
                }

                if (null != OnSignIn)
                {
                    OnSignIn(userPassport);
                }
            }

            return(verified);
        }