mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
admin(ui): display dynamic user information on sidebar
This commit is contained in:
@@ -20,12 +20,12 @@ abstract class BaseTransformer extends TransformerAbstract
|
||||
/**
|
||||
* @var \Pterodactyl\Models\ApiKey
|
||||
*/
|
||||
private $key;
|
||||
private ApiKey $key;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $rootAdmin;
|
||||
private bool $rootAdmin;
|
||||
|
||||
/**
|
||||
* Return the resource name for the JSONAPI output.
|
||||
|
||||
@@ -43,11 +43,10 @@ class UserTransformer extends BaseTransformer
|
||||
'language' => $model->language,
|
||||
'root_admin' => (bool) $model->root_admin,
|
||||
'2fa' => (bool) $model->use_totp,
|
||||
'avatar_url' => 'https://www.gravatar.com/avatar/' . md5($model->email) . '.jpg?s=40',
|
||||
'role_name' => $model->root_admin ? 'Super Administrator' : null,
|
||||
'avatar_url' => $model->avatarURL(),
|
||||
'role_name' => $model->roleName(),
|
||||
'created_at' => $this->formatTimestamp($model->created_at),
|
||||
'updated_at' => $this->formatTimestamp($model->updated_at),
|
||||
'avatar'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user