getUserThrottle() публичный Метод

Get the throttle provider for a given user
Автор: Steve Montambeault
public getUserThrottle ( $id ) : Cartalyst\Sentry\Throttling\ThrottleInterface
$id
Результат Cartalyst\Sentry\Throttling\ThrottleInterface
Пример #1
0
 /**
  * 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());
     }
 }
Пример #2
0
 /**
  * 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());
     }
 }