X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/72b46840f490f84fc95fcd2c5288fb33e168d44e..09bb840079b835529b298c4d84a9a2e0f8a4bdb8:/initialize.php diff --git a/initialize.php b/initialize.php index 5d721b80..63ed88d5 100644 --- a/initialize.php +++ b/initialize.php @@ -169,6 +169,12 @@ $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');