mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-25 22:38:40 +00:00
feat(web): hide realname when not logged in
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1c2f06c253
commit
4959e6da45
@ -222,10 +222,13 @@ class UOJUser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($user['usergroup'] == 'B') {
|
if ($user['usergroup'] == 'B') {
|
||||||
return '<span class="text-danger">' . $user['username'] . '</span>';
|
return HTML::tag('a', ['class' => 'text-danger fw-bold', 'href' => "/user/{$user['username']}"], $user['username']);
|
||||||
}
|
}
|
||||||
|
|
||||||
return HTML::tag('span', ['class' => 'uoj-username', 'data-realname' => trim(HTML::escape($user['realname']))], $user['username']);
|
// 未登录不可查看真实姓名
|
||||||
|
$realname = Auth::check() ? $user['realname'] : '';
|
||||||
|
|
||||||
|
return HTML::tag('span', ['class' => 'uoj-username', 'data-realname' => trim(HTML::escape($realname))], $user['username']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getUpdatedExtraVisitHistory($history, $cur) {
|
public static function getUpdatedExtraVisitHistory($history, $cur) {
|
||||||
|
Loading…
Reference in New Issue
Block a user