/** * Private Messages */ public function messages() { if (ee()->session->userdata('can_send_private_messages') != 'y' && ee()->session->userdata('group_id') != '1' or ee()->session->userdata('accept_messages') != 'y') { return $this->profile_main(); } if (!class_exists('EE_Messages')) { require APPPATH . 'libraries/Messages.php'; } $MESS = new EE_Messages(); $MESS->base_url = $this->_member_path('messages') . '/'; $MESS->allegiance = 'user'; $MESS->theme_path = $this->theme_path; $MESS->request = $this->cur_id; $MESS->cur_id = $this->uri_extra; $MESS->MS =& $this; $MESS->manager(); $this->page_title = $MESS->title; $this->head_extra = $MESS->header_javascript; return $MESS->return_data; }
/** ----------------------------------- /** Private Messages Manager /** -----------------------------------*/ function messages() { $id = !$this->input->get_post('id') ? $this->session->userdata['member_id'] : $this->input->get_post('id'); if ($id != $this->session->userdata['member_id']) { return false; } if (!class_exists('EE_Messages')) { require APPPATH . 'libraries/Messages.php'; } $MESS = new EE_Messages(); $MESS->manager(); // If both the title and the crumb variables are empty, then we have something that // does not need to be put in the member wrapper, like a popup. So, we just return // the return_date variable and be done with it. if ($MESS->title != '' && $MESS->crumb != '') { return $this->account_wrapper($MESS->title, $MESS->crumb, $MESS->return_data); } return $MESS->return_data; }