]> BookStack Code Mirror - bookstack/blobdiff - app/Repos/UserRepo.php
Increased LDAP testing and fixed any Auth-based bugs found
[bookstack] / app / Repos / UserRepo.php
index 77ad22f3996cf070e5b62c50ed413e326986e81e..d02ffe9290551ae685ca713fe5d3697074b1ca15 100644 (file)
@@ -48,6 +48,14 @@ class UserRepo
     {
         $user = $this->create($data);
         $this->attachDefaultRole($user);
+
+        // Get avatar from gravatar and save
+        if (!config('services.disable_services')) {
+            $avatar = \Images::saveUserGravatar($user);
+            $user->avatar()->associate($avatar);
+            $user->save();
+        }
+
         return $user;
     }