public void Login(string loginid, string password, bool isMD5Password, int expires, string cookieDomain) { DiscuzSession ds = new DiscuzSession(api, secret, url); int uid = ds.GetUserID(loginid); if (uid > 0) { ds.Login(uid, password, isMD5Password, expires, "www.92acg.cn"); } }
public void EditPassword(string username, string newMD5Password) { DiscuzSession ds = new DiscuzSession(api, secret, url); int uid = ds.GetUserID(username); if (uid > 0) { UserForEditing ufe = new UserForEditing(); ufe.Password = newMD5Password; ds.SetUserInfo(uid, ufe); } }
private void LoginCommunity(EyouSoft.SSOComponent.Entity.UserInfo UserModel) { int num = 100; try { DiscuzSession session = DiscuzSessionHelper.GetSession(); int userID = session.GetUserID(UserModel.UserName); string str = "tongye114.com"; NameValueCollection section = (NameValueCollection)ConfigurationManager.GetSection("DiscuzAPI"); if (section != null) { str = string.IsNullOrEmpty(section["CookieDomain"]) ? "tongye114.com" : section["CookieDomain"]; num = string.IsNullOrEmpty(section["CookieExpires"]) ? 100 : int.Parse(section["CookieExpires"]); } session.Login(userID, UserModel.PassWordInfo.NoEncryptPassword, false, num, str); } catch (Exception e) { } }
public static void Login(string pUserName, string puserPwd) { int userid = ds.GetUserID(pUserName); ds.Login(userid, puserPwd, false, 100, ""); }
public int IsUserExits(string loginid) { DiscuzSession ds = new DiscuzSession(api, secret, url); return(ds.GetUserID(loginid)); }