migration to new user system

This commit is contained in:
jacob 2010-07-15 20:28:35 +00:00
parent bffcf724d8
commit 5cd3f22088

View File

@ -114,10 +114,10 @@ echo mysql_error();
}
$u = user_load($id);
$types = array_keys($u['roles']);
$selected = $_GET['tab'];
if(!array_key_exists($selected, $tabs)) {
if(in_array('fair', $u['types']) )
if(in_array('fair', $types) )
$selected = 'fairinfo';
else
$selected = 'personal';
@ -149,7 +149,7 @@ foreach($tabs as $k=>$t) {
/* Make sure the tab is enabled */
if($t['enabled'] == false) continue;
/* Make sure the user has the right type to see the tab */
$i = array_intersect($t['types'], $u['types']);
$i = array_intersect($t['types'], $types);
if(count($i) == 0) continue;
if($k == $selected) $selected_index = $index;