Example #1
0
        /// <summary>
        /// 根据用户ID构造
        /// </summary>
        public SiteIdentity(int currentUserID)
        {
            user u = IuserEx.getEntityById(currentUserID) as user;

            if (u != null)
            {
                username = u.username;
                userid   = currentUserID;
                pubkey   = u.pubkey;
                prvkey   = u.prikey;
                password = u.password;
                webuser  = u;
            }
        }
Example #2
0
        /// <summary>
        /// 根据用户名构造
        /// </summary>
        public SiteIdentity(string currentUserName)
        {
            user u = IuserEx.getUser(currentUserName) as user;

            if (u != null)
            {
                username = currentUserName;
                userid   = u.id;
                pubkey   = u.pubkey;
                prvkey   = u.prikey;
                password = u.password;
                webuser  = u;
            }
        }
Example #3
0
 /// <summary>
 /// 检查当前用户对象密码
 /// </summary>
 public bool CheckPassword(string password)
 {
     return(IuserEx.checkPassword(username, password));
 }