public function is_current_user($id=false) { $user = $this->get_user($id); if(sizeof($user)>0) { return ($user->id == $this->ci->session->userdata("id") && $id ) ? true: false; } else { return false; } }
public function view($id) { if($this->ion_auth->is_current_user($id)) { // display profile with editing options or a dashed board; } else { // display as other users or a front page or anything else; } }