Merge pull request 'respect config settings' (#29) from master into 98
Reviewed-on: #29
This commit is contained in:
@@ -1428,8 +1428,8 @@ export default (router, tpl) => {
|
|||||||
const userId = newUser[0].id;
|
const userId = newUser[0].id;
|
||||||
|
|
||||||
await db`
|
await db`
|
||||||
INSERT INTO user_options (user_id, mode, theme, fullscreen, avatar, avatar_file, use_new_layout, disable_autoplay, disable_swiping)
|
INSERT INTO user_options (user_id, mode, theme, fullscreen, avatar, avatar_file, use_new_layout, disable_autoplay, disable_swiping, use_alternative_infobox)
|
||||||
VALUES (${userId}, 3, 'amoled', 0, NULL, 'default.png', ${getDefaultLayout() === 'modern'}, ${cfg.websrv.enable_autoplay === false}, ${cfg.websrv.enable_swiping === false})
|
VALUES (${userId}, 3, 'amoled', 0, NULL, 'default.png', ${getDefaultLayout() === 'modern'}, ${cfg.websrv.enable_autoplay === false}, ${cfg.websrv.enable_swiping === false}, ${cfg.websrv.user_alternative_infobox !== false})
|
||||||
`;
|
`;
|
||||||
|
|
||||||
await audit.log(req.session.id, 'admin_create_user', 'user', userId, {
|
await audit.log(req.session.id, 'admin_create_user', 'user', userId, {
|
||||||
|
|||||||
@@ -167,8 +167,8 @@ export default (router, tpl) => {
|
|||||||
const avatarFile = 'default.png';
|
const avatarFile = 'default.png';
|
||||||
|
|
||||||
await db`
|
await db`
|
||||||
insert into user_options (user_id, mode, theme, fullscreen, avatar, avatar_file, use_new_layout, disable_autoplay, disable_swiping)
|
insert into user_options (user_id, mode, theme, fullscreen, avatar, avatar_file, use_new_layout, disable_autoplay, disable_swiping, use_alternative_infobox)
|
||||||
values (${userId}, 3, 'amoled', 0, ${avatarId}, ${avatarFile}, ${getDefaultLayout() === 'modern'}, ${cfg.websrv.enable_autoplay === false}, ${cfg.websrv.enable_swiping === false})
|
values (${userId}, 3, 'amoled', 0, ${avatarId}, ${avatarFile}, ${getDefaultLayout() === 'modern'}, ${cfg.websrv.enable_autoplay === false}, ${cfg.websrv.enable_swiping === false}, ${cfg.websrv.user_alternative_infobox !== false})
|
||||||
`;
|
`;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`[REGISTER] DB Error during user creation:`, err);
|
console.error(`[REGISTER] DB Error during user creation:`, err);
|
||||||
|
|||||||
Reference in New Issue
Block a user