예제 #1
0
        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");
            }
        }
예제 #2
0
        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);
            }
        }
예제 #3
0
        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) { }
        }
예제 #4
0
파일: DZFn.cs 프로젝트: yuhua1987113/scai
        public static void Login(string pUserName, string puserPwd)
        {
            int userid = ds.GetUserID(pUserName);

            ds.Login(userid, puserPwd, false, 100, "");
        }
예제 #5
0
        public int IsUserExits(string loginid)
        {
            DiscuzSession ds = new DiscuzSession(api, secret, url);

            return(ds.GetUserID(loginid));
        }