public function __construct() { parent::__construct(); parent::redirectIfLoggedOut(); parent::redirectIfNotInternalAJAX(); parent::redirectIfInvalidCSRF(); // If we can't find a user id, get them out of here if (!isset($this->user_id) || !is_numeric($this->user_id)) { header('Location: /'); exit; } // Set default success to false $this->data['success'] = false; // Load user model $this->load->model('users_model', 'user'); }