public function changstatususer() { $input = Input::all(); $user = Sentry::findUserById($input['id']); $user->activated = $input['activated']; if ($user->save()) { $throttle = Sentry::findThrottlerByUserId($input['id']); if ($input['activated'] == 0) { $throttle->ban(); } else { $throttle->unBan(); } Response::json('1'); } else { Response::json('0'); } }