Hello,

In my template.php file I have the following:

function _phptemplate_variables($hook, $vars = array()) {
switch ($hook) {
case 'page':
global $user;
if (arg(0) == 'user'){
if ($user->uid == 0) {
$vars['template_file'] = 'page-admin';
}
elseif (arg(1) == 'login' || arg(1) == 'register' || arg(1) == 'password' ) {
$vars['template_file'] = 'page-admin';
}
}
break;
}

return $vars;
}

This directs you to a login page when you enter /user/ in the browser. After the user logs in I would like the user (all who will be admins) to be able to go to the admin page which is a seperate .tpl.php file from the page-admin.tpl.php file. How do I get this to happen? Any help would be much appreciated.

best
-vinnie