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