manage user profile url


i'd like to manage the users profile page with a url like this:


where the segment username is the nickname of the user logged in...

how can i set a controller like this?

thank you!

You can create an atuh controller and use the _remap() function to process the user.

Checkout the userguide for a (very) short example.

Another way is to use routing.
$route['auth/([a-z]+)'] = "auth/user/$1";

Where you map the username as a variable to a predefined method.

ok i'm goingo to try it....

if i well understand the real method of the controller 'auth' is 'user' and when i pass the username through an 'a href' the route ignores the username and pass variable and return the username info from the method 'user' in the controller 'auth', is it right?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.