Changeset View
Changeset View
Standalone View
Standalone View
src/app/User.php
Show First 20 Lines • Show All 543 Lines • ▼ Show 20 Lines | class User extends Authenticatable implements JWTSubject | ||||
public function name(bool $fallback = false): string | public function name(bool $fallback = false): string | ||||
{ | { | ||||
$firstname = $this->getSetting('first_name'); | $firstname = $this->getSetting('first_name'); | ||||
$lastname = $this->getSetting('last_name'); | $lastname = $this->getSetting('last_name'); | ||||
$name = trim($firstname . ' ' . $lastname); | $name = trim($firstname . ' ' . $lastname); | ||||
if (empty($name) && $fallback) { | if (empty($name) && $fallback) { | ||||
return \config('app.name') . ' User'; | return trim(\trans('app.siteuser', ['site' => \App\Tenant::getConfig($this->tenant_id, 'app.name')])); | ||||
} | } | ||||
return $name; | return $name; | ||||
} | } | ||||
/** | /** | ||||
* Remove a number of entitlements for the SKU. | * Remove a number of entitlements for the SKU. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |