manage user profile url

#1
[eluser]davidino86[/eluser]
hi,

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

Code:
www.mysite.com/auth/username

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


how can i set a controller like this?

thank you!

#2
[eluser]rogierb[/eluser]
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.
Code:
$route['auth/([a-z]+)'] = "auth/user/$1";

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

#3
[eluser]davidino86[/eluser]
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.