mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-27 12:41:58 +00:00
![Dan Brown](/assets/img/avatar_default.png)
Tools seems to fit better since the classes were a bit of a mixed bunch and did not always manage. Also simplified the structure of the SlugGenerator class. Also focused EntityContext on shelves and simplified to use session helper.
29 lines
552 B
PHP
29 lines
552 B
PHP
<?php namespace BookStack\Auth;
|
|
|
|
use BookStack\Interfaces\Loggable;
|
|
use BookStack\Model;
|
|
|
|
/**
|
|
* Class SocialAccount
|
|
* @property string $driver
|
|
* @property User $user
|
|
*/
|
|
class SocialAccount extends Model implements Loggable
|
|
{
|
|
|
|
protected $fillable = ['user_id', 'driver', 'driver_id', 'timestamps'];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function logDescriptor(): string
|
|
{
|
|
return "{$this->driver}; {$this->user->logDescriptor()}";
|
|
}
|
|
}
|