App\Ninja\Repositories\AccountRepository::unlinkUserFromOauth PHP Method

unlinkUserFromOauth() public method

public unlinkUserFromOauth ( $user )
    public function unlinkUserFromOauth($user)
    {
        $user->oauth_provider_id = null;
        $user->oauth_user_id = null;
        $user->save();
    }

Usage Example

Exemplo n.º 1
0
 /**
  * @return \Illuminate\Http\RedirectResponse
  */
 public function authUnlink()
 {
     $this->accountRepo->unlinkUserFromOauth(Auth::user());
     Session::flash('message', trans('texts.updated_settings'));
     return redirect()->to('/settings/' . ACCOUNT_USER_DETAILS);
 }