Exemple #1
0
        /// <summary>
        /// activate account after gegister
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="tokenKey"></param>
        /// <returns></returns>
        public ResponseModel Activate(string userName, string tokenKey)
        {
            var response = new ResponseModel();
            // Kiểm tra tính hợp lệ của token

            // authenticate with token key
            var userInformationDL = new UserInformationDAL();
            var userInfo          = userInformationDL.GetByUserName(userName);

            if (userInfo != null)
            {
                userInformationDL.UpdateConfirmEmail(userInfo.UserEmail);
                response.Code = SystemStatusCode.Success.GetHashCode();
                return(response);
            }
            else
            {
                response.Code    = SystemStatusCode.DataNull.GetHashCode();
                response.Message = "Không tìm thấy thông tin người dùng !";
                return(response);
            }
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public UserInformation GetByUserName(string userName)
        {
            var userInformationDAL = new UserInformationDAL();

            return(userInformationDAL.GetByUserName(userName));
        }