]> BookStack Code Mirror - bookstack/blobdiff - app/Services/SocialAuthService.php
replace GPL diff lib with MIT lib
[bookstack] / app / Services / SocialAuthService.php
index 2437a482706b20dd4db1eebcfef5f512d0e1e013..ba3479349c4158d80479752daeaff0ec8af204f4 100644 (file)
@@ -1,14 +1,11 @@
 <?php namespace BookStack\Services;
 
-use GuzzleHttp\Exception\ClientException;
 use Laravel\Socialite\Contracts\Factory as Socialite;
 use BookStack\Exceptions\SocialDriverNotConfigured;
 use BookStack\Exceptions\SocialSignInException;
 use BookStack\Exceptions\UserRegistrationException;
-use BookStack\Http\Controllers\Auth\AuthController;
 use BookStack\Repos\UserRepo;
 use BookStack\SocialAccount;
-use BookStack\User;
 
 class SocialAuthService
 {
@@ -135,7 +132,7 @@ class SocialAuthService
 
         // Otherwise let the user know this social account is not used by anyone.
         $message = 'This ' . $socialDriver . ' account is not linked to any users. Please attach it in your profile settings';
-        if (\Setting::get('registration-enabled')) {
+        if (setting('registration-enabled')) {
             $message .= ' or, If you do not yet have an account, You can register an account using the ' . $socialDriver . ' option';
         }
         throw new SocialSignInException($message . '.', '/login');