X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=initialize.php;h=5dcd6fffde274cb27359f164c10df1a6055a9c11;hb=3f7ed883e1c7d75aacc49900b403f8e84a68dc3f;hp=53342b686955afdf7e569ad9eed42eebfe879984;hpb=585e3677a73f80cadd664572e3863fc38e4d8633;p=timetracker.git diff --git a/initialize.php b/initialize.php index 53342b68..5dcd6fff 100644 --- a/initialize.php +++ b/initialize.php @@ -169,13 +169,6 @@ $msg = new ActionErrors(); // Notification messages (not errrors) for user. // Create an instance of ttUser class. This gets us most of user details. import('ttUser'); $user = new ttUser(null, $auth->getUserId()); -// Temporary code to assign role_id to users who don't yet have it. -/* -if ($user->login && !$user->role_id) { - $user->migrateLegacyRole(); - // Recycle User object, now with proper role_id. - $user = new ttUser(null, $auth->getUserId()); -}*/ if ($user->custom_logo) { $smarty->assign('custom_logo', 'images/'.$user->team_id.'.png'); $smarty->assign('mobile_custom_logo', '../images/'.$user->team_id.'.png'); @@ -206,6 +199,13 @@ if (!$lang) { // Load i18n file. $i18n->load($lang); +// Temporary code to assign role_id to users who don't yet have it. +if ($user->login && !$user->role_id) { + $user->migrateLegacyRole(); // Note: this requires initialized $i18n. + // Recycle User object, now with proper role_id. + $user = new ttUser(null, $auth->getUserId()); +} + // Assign things for smarty to use in template files. $smarty->assign('i18n', $i18n->keys); $smarty->assign('err', $err);