Upgrade to 3.7.0
This commit is contained in:
17
kirby/src/Panel/User.php
Normal file → Executable file
17
kirby/src/Panel/User.php
Normal file → Executable file
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace Kirby\Panel;
|
||||
|
||||
use Kirby\Cms\Url;
|
||||
use Kirby\Toolkit\I18n;
|
||||
|
||||
/**
|
||||
* Provides information about the user model for the Panel
|
||||
* @since 3.6.0
|
||||
@@ -51,7 +54,7 @@ class User extends Model
|
||||
$result[] = [
|
||||
'dialog' => $url . '/changeName',
|
||||
'icon' => 'title',
|
||||
'text' => t($i18nPrefix . '.changeName'),
|
||||
'text' => I18n::translate($i18nPrefix . '.changeName'),
|
||||
'disabled' => $this->isDisabledDropdownOption('changeName', $options, $permissions)
|
||||
];
|
||||
|
||||
@@ -60,28 +63,28 @@ class User extends Model
|
||||
$result[] = [
|
||||
'dialog' => $url . '/changeEmail',
|
||||
'icon' => 'email',
|
||||
'text' => t('user.changeEmail'),
|
||||
'text' => I18n::translate('user.changeEmail'),
|
||||
'disabled' => $this->isDisabledDropdownOption('changeEmail', $options, $permissions)
|
||||
];
|
||||
|
||||
$result[] = [
|
||||
'dialog' => $url . '/changeRole',
|
||||
'icon' => 'bolt',
|
||||
'text' => t('user.changeRole'),
|
||||
'text' => I18n::translate('user.changeRole'),
|
||||
'disabled' => $this->isDisabledDropdownOption('changeRole', $options, $permissions)
|
||||
];
|
||||
|
||||
$result[] = [
|
||||
'dialog' => $url . '/changePassword',
|
||||
'icon' => 'key',
|
||||
'text' => t('user.changePassword'),
|
||||
'text' => I18n::translate('user.changePassword'),
|
||||
'disabled' => $this->isDisabledDropdownOption('changePassword', $options, $permissions)
|
||||
];
|
||||
|
||||
$result[] = [
|
||||
'dialog' => $url . '/changeLanguage',
|
||||
'icon' => 'globe',
|
||||
'text' => t('user.changeLanguage'),
|
||||
'text' => I18n::translate('user.changeLanguage'),
|
||||
'disabled' => $this->isDisabledDropdownOption('changeLanguage', $options, $permissions)
|
||||
];
|
||||
|
||||
@@ -90,7 +93,7 @@ class User extends Model
|
||||
$result[] = [
|
||||
'dialog' => $url . '/delete',
|
||||
'icon' => 'trash',
|
||||
'text' => t($i18nPrefix . '.delete'),
|
||||
'text' => I18n::translate($i18nPrefix . '.delete'),
|
||||
'disabled' => $this->isDisabledDropdownOption('delete', $options, $permissions)
|
||||
];
|
||||
|
||||
@@ -119,7 +122,7 @@ class User extends Model
|
||||
{
|
||||
if ($home = ($this->model->blueprint()->home() ?? null)) {
|
||||
$url = $this->model->toString($home);
|
||||
return url($url);
|
||||
return Url::to($url);
|
||||
}
|
||||
|
||||
return Panel::url('site');
|
||||
|
Reference in New Issue
Block a user