/// <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; } }
/// <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; } }
/// <summary> /// 检查当前用户对象密码 /// </summary> public bool CheckPassword(string password) { return(IuserEx.checkPassword(username, password)); }