BookStack\Services\SocialAuthService::getActiveDrivers PHP Method

getActiveDrivers() public method

Gets the names of the active social drivers.
public getActiveDrivers ( ) : array
return array
    public function getActiveDrivers()
    {
        $activeDrivers = [];
        foreach ($this->validSocialDrivers as $driverName) {
            if ($this->checkDriverConfigured($driverName)) {
                $activeDrivers[$driverName] = true;
            }
        }
        return $activeDrivers;
    }

Usage Example

コード例 #1
0
ファイル: UserController.php プロジェクト: crono/BookStack
 /**
  * Show the form for editing the specified user.
  * @param  int              $id
  * @param SocialAuthService $socialAuthService
  * @return Response
  */
 public function edit($id, SocialAuthService $socialAuthService)
 {
     $this->checkPermissionOr('user-update', function () use($id) {
         return $this->currentUser->id == $id;
     });
     $user = $this->user->findOrFail($id);
     $activeSocialDrivers = $socialAuthService->getActiveDrivers();
     $this->setPageTitle('User Profile');
     return view('users/edit', ['user' => $user, 'activeSocialDrivers' => $activeSocialDrivers]);
 }
All Usage Examples Of BookStack\Services\SocialAuthService::getActiveDrivers