]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/SocialAccount.php
Improve sorting Shelf Books
[bookstack] / app / Auth / SocialAccount.php
index 7d0dbaafc60245a5247e5b61a8f66db2ef327371..116cdc8546957a4071ad54bbc52aba5b8b6ede6c 100644 (file)
@@ -1,9 +1,14 @@
 <?php namespace BookStack\Auth;
 
-use BookStack\Auth\User;
+use BookStack\Interfaces\Loggable;
 use BookStack\Model;
 
-class SocialAccount extends Model
+/**
+ * Class SocialAccount
+ * @property string $driver
+ * @property User $user
+ */
+class SocialAccount extends Model implements Loggable
 {
 
     protected $fillable = ['user_id', 'driver', 'driver_id', 'timestamps'];
@@ -12,4 +17,12 @@ class SocialAccount extends Model
     {
         return $this->belongsTo(User::class);
     }
+
+    /**
+     * @inheritDoc
+     */
+    public function logDescriptor(): string
+    {
+        return "{$this->driver}; {$this->user->logDescriptor()}";
+    }
 }