if (Post::i('token_access', 0) != ($user->token_access ? 1 : 0)) {
$to_update['token'] = Post::i('token_access') ? rand_url_id(16) : null;
}
- if (Post::i('skin', 0) != $user->skin) {
- $to_update['skin'] = Post::i('skin', 0);
+ if (Post::i('skin') != $user->skin) {
+ $to_update['skin'] = Post::i('skin');
if ($to_update['skin'] == 0) {
- $to_update['skin'] = null;
+ $to_update['skin'] = 1;
}
}
if (Post::s('state') != $user->state) {
display_name varchar(255) default null,
sex enum('female', 'male') not null default 'male',
email_format enum('text', 'html') not null default 'html',
- skin varchar(32) default null,
+ skin tinyint(1) unsigned not null default 1,
last_version varchar(16) not null,
primary key uid (uid),
prenom AS display_name,
IF(FIND_IN_SET('femme', flags), 'female', 'male') AS sex,
IF(q.core_mail_fmt = 'html', 'html', 'text') AS email_format,
- q.skin AS skin,
+ IF(q.skin IS NULL OR q.skin = 0, 1, q.skin) AS skin,
q.last_version AS last_version
from #x4dat#.auth_user_md5 as u
left join #x4dat#.auth_user_quick as q on (q.user_id = u.user_id)