Get the throttle provider for a given user
public getUserThrottle ( $id ) : Cartalyst\Sentry\Throttling\ThrottleInterface | ||
$id | ||
return | Cartalyst\Sentry\Throttling\ThrottleInterface |
/** * Show the user Throttling status * * @author Steve Montambeault * @link http://stevemo.ca * * @param int $id * * @return \Illuminate\Http\RedirectResponse|\Illuminate\View\View */ public function getStatus($id) { try { $throttle = $this->users->getUserThrottle($id); $user = $throttle->getUser(); return View::make(Config::get('cpanel::views.throttle_status'))->with('user', $user)->with('throttle', $throttle); } catch (UserNotFoundException $e) { return Redirect::route('admin.users.index')->with('error', $e->getMessage()); } }
/** * Show a user profile * * @author Steve Montambeault * @link http://stevemo.ca * * @param int $id * @return Response */ public function show($id) { try { $throttle = $this->users->getUserThrottle($id); $user = $throttle->getUser(); $permissions = $user->getMergedPermissions(); return View::make(Config::get('cpanel::views.users_show'))->with('user', $user)->with('groups', $user->getGroups())->with('permissions', $permissions)->with('throttle', $throttle); } catch (UserNotFoundException $e) { return Redirect::route('cpanel.users.index')->with('error', $e->getMessage()); } }