mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-19 04:51:27 +00:00
commit
1a30e488f9
1 changed files with 17 additions and 10 deletions
23
app/User.php
23
app/User.php
|
@ -19,9 +19,10 @@ class User extends Authenticatable
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'deleted_at' => 'datetime',
|
'deleted_at' => 'datetime',
|
||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
'2fa_setup_at' => 'datetime'
|
'2fa_setup_at' => 'datetime',
|
||||||
|
'last_active_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -30,7 +31,13 @@ class User extends Authenticatable
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name', 'username', 'email', 'password', 'app_register_ip'
|
'name',
|
||||||
|
'username',
|
||||||
|
'email',
|
||||||
|
'password',
|
||||||
|
'app_register_ip',
|
||||||
|
'email_verified_at',
|
||||||
|
'last_active_at'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,11 +107,11 @@ class User extends Authenticatable
|
||||||
|
|
||||||
public function avatarUrl()
|
public function avatarUrl()
|
||||||
{
|
{
|
||||||
if(!$this->profile_id || $this->status) {
|
if(!$this->profile_id || $this->status) {
|
||||||
return config('app.url') . '/storage/avatars/default.jpg';
|
return config('app.url') . '/storage/avatars/default.jpg';
|
||||||
}
|
}
|
||||||
|
|
||||||
return AvatarService::get($this->profile_id);
|
return AvatarService::get($this->profile_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue