protected void Page_Load(object sender, EventArgs e) { ds = DiscuzSessionHelper.GetSession(); if (!IsPostBack) { User user; try { ds.session_info = ds.GetSessionFromToken(Session["AuthToken"].ToString()); } catch { Response.Redirect("SessionCreater.aspx?next=usermanage"); } if (ds.session_info.UId <= 0) Response.Redirect("default.aspx"); user = ds.GetLoggedInUser().GetUserInfo(); IDLabel.Text = user.UId.ToString(); RealNameBox.Text = user.RealName; IDNumBox.Text = user.IdCard; MobileBox.Text = user.Mobile; TelphoneBox.Text = user.Phone; GenderBox.Text = user.Gender.ToString(); NickNameBox.Text = user.NickName; EmailBox.Text = user.Email; UserIndexBox.Text = user.WebSite; LocationBox.Text = user.Location; avatarUrl = user.Avatar; } }
protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["dnt"] == null) { unlogin.Visible = true; ds = DiscuzSessionHelper.GetSession(); } else { login.Visible = true; ds = DiscuzSessionHelper.GetSession(); try { ds.session_info = ds.GetSessionFromToken(Session["AuthToken"].ToString()); } catch { Response.Redirect("SessionCreater.aspx?next=default"); } userName = ds.GetUserInfo(ds.GetLoggedInUser().UId).UserName; } }