public static int GetCookieUserId() { int uid = 0; int.TryParse(DiscuzHelper.GetCookie("userid"), out uid); return(uid); }
public static string GetCookieUserName() { if (IsDizLogin) { string username = DiscuzHelper.GetCookie("username"); if (string.IsNullOrEmpty(username)) { username = DizUser.Username; DiscuzHelper.WriteCookie("username", username); } return(username); } else { return(String.Empty); } }