CREATE TABLE `xf_user` (
`user_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`username` VARCHAR(50) NOT NULL,
`email` VARCHAR(120) NOT NULL,
`gender` ENUM('','male','female') NOT NULL DEFAULT '' COMMENT 'Leave empty for \'unspecified\'',
`custom_title` VARCHAR(50) NOT NULL DEFAULT '',
`language_id` INT(10) UNSIGNED NOT NULL,
`style_id` INT(10) UNSIGNED NOT NULL COMMENT '0 = use system default',
`timezone` VARCHAR(50) NOT NULL COMMENT 'Example: \'Europe/London\'',
`visible` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Show browsing activity to others',
`user_group_id` INT(10) UNSIGNED NOT NULL,
`secondary_group_ids` VARBINARY(255) NOT NULL,
`display_style_group_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'User group ID that provides user styling',
`permission_combination_id` INT(10) UNSIGNED NOT NULL,
`message_count` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`conversations_unread` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`register_date` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`last_activity` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`trophy_points` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`alerts_unread` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`avatar_date` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`avatar_width` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`avatar_height` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`gravatar` VARCHAR(120) NOT NULL DEFAULT '' COMMENT 'If specified, this is an email address corresponding to the user\'s \'Gravatar\'',
`user_state` ENUM('valid','email_confirm','email_confirm_edit','moderated','email_bounce') NOT NULL DEFAULT 'valid',
`is_moderator` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`is_admin` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`is_banned` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`like_count` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`warning_points` INT(10) UNSIGNED NOT NULL DEFAULT '0',
`is_staff` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`activity_visible` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY (`user_id`),
UNIQUE INDEX `username` (`username`),
INDEX `email` (`email`),
INDEX `user_state` (`user_state`),
INDEX `last_activity` (`last_activity`),
INDEX `message_count` (`message_count`),
INDEX `trophy_points` (`trophy_points`),
INDEX `like_count` (`like_count`),
INDEX `register_date` (`register_date`),
INDEX `staff_username` (`is_staff`, `username`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=3;