hasIdentity()) { $user = $auth->getIdentity(); echo ''.$user->username.' '; if ($user->usertype=="administrator") echo '后台管理 '; echo '数据篮 注销'; } else { echo '登录 注册'; } ?>