User profile page |
[eluser]emilolsson[/eluser]
Hello all. I use Dx Auth for user authentication. So the users can log-in and log-out etc. Now I would like to give every user their own profile page with the following URL structure: http://doamin.com/profile/johndoe But I don't understand how to get all the usernames in the last segment. Anyone who can point me in the right direction?
[eluser]Michael Wales[/eluser]
Code: $route['profile/([A-Za-z0-9-]+)'] = 'profile/view/$1'
[eluser]SteveBluck[/eluser]
Put this in your routes.php file Code: $route['profile/:any'] = "profile"; This means anything after the profile segment will go to the profile controller. Then in your controller, you can do something like this Code: if($this->uri->segment(2) == TRUE) Hope this helps
|
Welcome Guest, Not a member yet? Register Sign In |