// url: http://example.com/user/profile/3213 function profile($id) { if(this->ion_auth->is_current_user($id)) { // show an editable profile } else { // show profile to public } }