/** * Constructor * * @access public * @return null */ public function __construct($switch = TRUE) { parent::__construct(); if ((bool) $switch === FALSE) { return; } // Install or Uninstall Request // -------------------------------------------- // Module Menu Items // -------------------------------------------- $menu = array('module_preferences' => array('link' => $this->base . '&method=preferences', 'title' => lang('preferences')), 'module_reassign_ownership' => array('link' => $this->base . '&method=reassign_ownership', 'title' => lang('reassign_ownership')), 'module_documentation' => array('link' => USER_DOCS_URL, 'title' => lang('online_documentation'), 'new_window' => TRUE)); $this->cached_vars['lang_module_version'] = lang('user_module_version'); $this->cached_vars['module_version'] = USER_VERSION; $this->cached_vars['module_menu_highlight'] = 'module_preferences'; $this->cached_vars['module_menu'] = $menu; // -------------------------------------------- // Sites // -------------------------------------------- $this->cached_vars['sites'] = array(); $this->EE->load->model('user_model'); foreach ($this->EE->user_model->get_sites() as $site_id => $site_label) { $this->cached_vars['sites'][$site_id] = $site_label; } // ------------------------------------- // Module Installed and What Version? // ------------------------------------- if ($this->database_version() == FALSE) { return; } elseif ($this->version_compare($this->database_version(), '<', USER_VERSION)) { // For EE 2.x, we need to redirect the request to Update Routine $_GET['method'] = 'user_module_update'; } }
/** * Contructor * * @access public * @return null */ public function __construct() { parent::__construct(); // -------------------------------------------- // Module Actions // -------------------------------------------- $this->module_actions = array('group_edit', 'edit_profile', 'reg', 'reassign_jump', 'retrieve_password', 'do_logout', 'do_search', 'delete_account', 'activate_member', 'retrieve_username', 'create_key'); // -------------------------------------------- // Extension Hooks // -------------------------------------------- $default = array('class' => $this->extension_name, 'settings' => '', 'priority' => 5, 'version' => constant(strtoupper($this->class_name) . '_VERSION'), 'enabled' => 'y'); $this->hooks = array(array_merge($default, array('method' => 'insert_comment_start', 'hook' => 'insert_comment_start')), array_merge($default, array('method' => 'insert_rating_start', 'hook' => 'insert_rating_start')), array_merge($default, array('method' => 'paypalpro_payment_start', 'hook' => 'paypalpro_payment_start')), array_merge($default, array('method' => 'freeform_module_insert_begin', 'hook' => 'freeform_module_insert_begin')), array_merge($default, array('method' => 'cp_members_validate_members', 'hook' => 'cp_members_validate_members', 'priority' => 1)), array_merge($default, array('method' => 'delete_entries_start', 'hook' => 'delete_entries_start'))); }
/** * Constructor * * @access public * @return null */ public function __construct() { parent::__construct(); // -------------------------------------------- // Language Files of Translating Might! // -------------------------------------------- $this->EE->lang->loadfile('myaccount'); $this->EE->lang->loadfile('member'); // Goes last as User overrides a few Member language variables $this->EE->lang->loadfile('user'); // -------------------------------------------- // Welcome Email // -------------------------------------------- if ($this->EE->config->item('req_mbr_activation') == 'manual' and $this->EE->db->table_exists('exp_user_welcome_email_list')) { $query = $this->EE->db->query("SELECT m.screen_name, m.email, m.username, m.member_id\n\t\t\t\t FROM \texp_members AS m,\n\t\t\t\t \t\texp_user_welcome_email_list AS el\n\t\t\t\t WHERE \tm.member_id = el.member_id\n\t\t\t\t AND \tel.email_sent = 'n'\n\t\t\t\t AND \tel.group_id != m.group_id\n\t\t\t\t LIMIT \t2"); foreach ($query->result_array() as $row) { $this->welcome_email($row); } } //-------------------------------------------- // System lang directory //-------------------------------------------- $this->lang_dir = APPPATH . 'language/'; //-------------------------------------------- // force https? //-------------------------------------------- $this->_force_https(); }