/** * Suspend the user associated with the throttle. * * @return void */ public function suspend() { RevisionRepository::create(['revisionable_type' => Config::get('sentry.users.model'), 'revisionable_id' => $this['user_id'], 'key' => 'suspended_at', 'old_value' => $this['suspended_at'], 'new_value' => new DateTime(), 'user_id' => null]); parent::suspend(); }
/** * Store the deleted time. * * @return void */ public function postDelete() { RevisionRepository::create(['revisionable_type' => get_class($this), 'revisionable_id' => $this->getKey(), 'key' => 'deleted_at', 'old_value' => null, 'new_value' => new DateTime(), 'user_id' => $this->getUserId()]); }
/** * Removes the user from the given group. * * @param \Cartalyst\Sentry\Groups\GroupInterface $group * * @return bool */ public function removeGroup(GroupInterface $group) { RevisionRepository::create(['revisionable_type' => get_class($this), 'revisionable_id' => $this->getKey(), 'key' => 'removed_group', 'old_value' => null, 'new_value' => $group->getName(), 'user_id' => Credentials::getUser()->id]); return parent::removeGroup($group); }