Skip to content

Instantly share code, notes, and snippets.

@croxton
Last active April 8, 2018 02:24
Show Gist options
  • Save croxton/7153533 to your computer and use it in GitHub Desktop.
Save croxton/7153533 to your computer and use it in GitHub Desktop.
Spoofing the session
// Pretend to be a SuperAdmin.
// Don't really do this, setup a member group and account with the minimum permissions needed
$this->EE->session->userdata['group_id'] = 1;
$this->EE->session->userdata['member_id'] = 1;
$this->EE->session->userdata['can_delete_self_entries'] = 'y';
$this->EE->session->userdata['can_delete_all_entries'] = 'y';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment