PhpBB3 Database Structure Overview phpbb users

From PHPBB用户手册

Jump to: navigation, search
# Table: 'phpbb_users'
CREATE TABLE phpbb_users (
	user_id mediumint(8) UNSIGNED NOT NULL auto_increment, 用户ID
	user_type tinyint(2) DEFAULT '0' NOT NULL, 用户类型 -- 待补充
	group_id mediumint(8) UNSIGNED DEFAULT '3' NOT NULL, 用户组ID
	user_permissions mediumtext NOT NULL, 用户权限
	user_perm_from mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, 引用权限自用户ID
	user_ip varchar(40) DEFAULT '' NOT NULL, 用户ip
	user_regdate int(11) UNSIGNED DEFAULT '0' NOT NULL, 用户注册日期
	username varchar(255) DEFAULT '' NOT NULL, 用户名称
	username_clean varchar(255) DEFAULT '' NOT NULL, 净化后的用户名 -- 用于与其它对用户名字符要求较严格的系统对接
	user_password varchar(40) DEFAULT '' NOT NULL, 32位用户密码哈希值
	user_passchg int(11) UNSIGNED DEFAULT '0' NOT NULL,  ??
	user_pass_convert tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, ??
	user_email varchar(100) DEFAULT '' NOT NULL, 用户email
	user_email_hash bigint(20) DEFAULT '0' NOT NULL, 用户email哈希值
	user_birthday varchar(10) DEFAULT '' NOT NULL, 用户生日
	user_lastvisit int(11) UNSIGNED DEFAULT '0' NOT NULL, 用户最后访问时间
	user_lastmark int(11) UNSIGNED DEFAULT '0' NOT NULL, ??
	user_lastpost_time int(11) UNSIGNED DEFAULT '0' NOT NULL, 用户最后发表文章时间
	user_lastpage varchar(200) DEFAULT '' NOT NULL, ??
	user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, ??
	user_last_search int(11) UNSIGNED DEFAULT '0' NOT NULL, ??
	user_warnings tinyint(4) DEFAULT '0' NOT NULL, 用户的警告数
	user_last_warning int(11) UNSIGNED DEFAULT '0' NOT NULL, 用户最近的警告时间
	user_login_attempts tinyint(4) DEFAULT '0' NOT NULL, 用户登录尝试次数
	user_inactive_reason tinyint(2) DEFAULT '0' NOT NULL, 用户被冻结的原因
	user_inactive_time int(11) UNSIGNED DEFAULT '0' NOT NULL, 用户被冻结的时间
	user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, 用户的文章数
	user_lang varchar(30) DEFAULT '' NOT NULL, 用户的语言
	user_timezone decimal(5,2) DEFAULT '0' NOT NULL, 用户的时区
	user_dst tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, ??
	user_dateformat varchar(30) DEFAULT 'd M Y H:i' NOT NULL, 用户的时间显示格式
	user_style smallint(4) UNSIGNED DEFAULT '0' NOT NULL, 用户的显示风格
	user_rank mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, 用户等级
	user_colour varchar(6) DEFAULT '' NOT NULL, 用户颜色
	user_new_privmsg tinyint(4) DEFAULT '0' NOT NULL, 用户的新短信数
	user_unread_privmsg tinyint(4) DEFAULT '0' NOT NULL, 用户的未读短信数
	user_last_privmsg int(11) UNSIGNED DEFAULT '0' NOT NULL, 用户的最近短信时间
	user_message_rules tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, 用户的短信规则 ??
	user_full_folder int(11) DEFAULT '-3' NOT NULL, ??
	user_emailtime int(11) UNSIGNED DEFAULT '0' NOT NULL, ??
	user_topic_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL, 
	user_topic_sortby_type varchar(1) DEFAULT 't' NOT NULL,
	user_topic_sortby_dir varchar(1) DEFAULT 'd' NOT NULL,
	user_post_show_days smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
	user_post_sortby_type varchar(1) DEFAULT 't' NOT NULL,
	user_post_sortby_dir varchar(1) DEFAULT 'a' NOT NULL,
	user_notify tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
	user_notify_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
	user_notify_type tinyint(4) DEFAULT '0' NOT NULL,
	user_allow_pm tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
	user_allow_viewonline tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
	user_allow_viewemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
	user_allow_massemail tinyint(1) UNSIGNED DEFAULT '1' NOT NULL,
	user_options int(11) UNSIGNED DEFAULT '895' NOT NULL,
	user_avatar varchar(255) DEFAULT '' NOT NULL,
	user_avatar_type tinyint(2) DEFAULT '0' NOT NULL,
	user_avatar_width smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
	user_avatar_height smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
	user_sig mediumtext NOT NULL, 用户签名档
	user_sig_bbcode_uid varchar(5) DEFAULT '' NOT NULL,
	user_sig_bbcode_bitfield varchar(255) DEFAULT '' NOT NULL,
	user_from varchar(100) DEFAULT '' NOT NULL, 用户来自
	user_icq varchar(15) DEFAULT '' NOT NULL,
	user_aim varchar(255) DEFAULT '' NOT NULL,
	user_yim varchar(255) DEFAULT '' NOT NULL,
	user_msnm varchar(255) DEFAULT '' NOT NULL,
	user_jabber varchar(255) DEFAULT '' NOT NULL, 
	user_website varchar(200) DEFAULT '' NOT NULL, 用户的站点
	user_occ text NOT NULL, 
	user_interests text NOT NULL, 用户的兴趣爱好
	user_actkey varchar(32) DEFAULT '' NOT NULL, 用户的激活密钥
	user_newpasswd varchar(32) DEFAULT '' NOT NULL, 用户的新密码哈希值
	PRIMARY KEY (user_id),
	KEY user_birthday (user_birthday),
	KEY user_email_hash (user_email_hash),
	KEY user_type (user_type),
	UNIQUE username_clean (username_clean)
) CHARACTER SET `utf8` COLLATE `utf8_bin`;