mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
bd6a1a66d1
Also fixed audit log to work for non-entity items.
30 lines
579 B
PHP
30 lines
579 B
PHP
<?php namespace BookStack\Auth;
|
|
|
|
use BookStack\Interfaces\Loggable;
|
|
use BookStack\Model;
|
|
|
|
/**
|
|
* Class SocialAccount
|
|
* @property string $driver
|
|
* @property User $user
|
|
* @package BookStack\Auth
|
|
*/
|
|
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()}";
|
|
}
|
|
}
|