Welcome Guest, Not a member yet? Register   Sign In
How to display a users personal page from URL - mysite/username
#10

[eluser]CroNiX[/eluser]
I believe your route is telling it to go to the index method, so it will.
Try: $route['(.*)'] = 'welcome/$1';
You don't want to use method exists with the way you are using _remap(). If you make the above change to your route, $method will actually be the user name, which won't exist as a method.
Code:
public function _remap($method, $params = array())
{
  $user_info = $this->membership_model->get_member($method);
  if (count($user_info) > 0)
  {
    // Display the user with the profile page.
    $data['user_info'] = $user_info;
    $data['main_content'] = 'profile_view';
    $this->load->view('includes/template', $data);  
  }
  else
  {
    show_404();
  }
}


Messages In This Thread
How to display a users personal page from URL - mysite/username - by El Forum - 02-28-2012, 01:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB