Changeset View
Changeset View
Standalone View
Standalone View
src/app/User.php
Show First 20 Lines • Show All 445 Lines • ▼ Show 20 Lines | public function name(bool $fallback = false): string | ||||
if (empty($name) && $fallback) { | if (empty($name) && $fallback) { | ||||
return trim(\trans('app.siteuser', ['site' => \App\Tenant::getConfig($this->tenant_id, 'app.name')])); | return trim(\trans('app.siteuser', ['site' => \App\Tenant::getConfig($this->tenant_id, 'app.name')])); | ||||
} | } | ||||
return $name; | return $name; | ||||
} | } | ||||
/** | /** | ||||
* Old passwords for this user. | |||||
* | |||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany | |||||
*/ | |||||
public function passwords() | |||||
{ | |||||
return $this->hasMany('App\UserPassword'); | |||||
} | |||||
/** | |||||
* Return resources controlled by the current user. | * Return resources controlled by the current user. | ||||
* | * | ||||
* @param bool $with_accounts Include resources assigned to wallets | * @param bool $with_accounts Include resources assigned to wallets | ||||
* the current user controls but not owns. | * the current user controls but not owns. | ||||
* | * | ||||
* @return \Illuminate\Database\Eloquent\Builder Query builder | * @return \Illuminate\Database\Eloquent\Builder Query builder | ||||
*/ | */ | ||||
public function resources($with_accounts = true) | public function resources($with_accounts = true) | ||||
▲ Show 20 Lines • Show All 287 Lines • Show Last 20 Lines |