Username within the profile url
Permalink 3 users found helpfulI'm having an issue trying to get the username to display within the url as such www.www.mysite.com/profiles/username...
Instead of taking me to the profile it forwards me to the home page of the site.
Now if I typehttp://www.mysite.com/profiles/2 it takes me to the user's profile page. So it is only working based off the user's ID, vs their username.
Ultimately I want to it to readhttp://www.mysite.com/username but I can handle that with some redirects on the server level.
I DO have public profiles enabled within the dashboard. Is there a setting I'm missing?
Thanks!
1. Copy /concrete/controllers/profile/controller.php to /controllers/profile/
2. Insert the following lines after line 30:
which will simply lookup the user by username if the URL doesn't contain a number.
I tested it locally and it works just fine.
EDIT: the url is /profile/username not /username directly.
http://bit.ly/bv8UF5
However this is a great solution for staying with the profiles confines. This should be in the core code by default I'd like to think. I wasn't sure if I messed something up or if it was just a simple code change. Now I know. Thanks!
I agree with this being in the core (hint hint). Seems like an easy change that I think it pretty helpful.
or am I doing something wrong okhayat
and will this work with future upgrades?
Has not made it into the core yet, but agree that would be most valuable
I was on a development server using a domain.com/directory
Once on the root it works great!
I have allow spaces in username turned on in config and that works too!
so I can typewww.www.website.com/profile/user... name
it fills the space with %20 but does land on the persons profile.
Thank you.
What you may want to try is to create a single page which will get the username,http://www.mysite.com/users/johndoe,... perform the search and display the result, or redirect to the correct page,http://www.mysite.com/profiles/2/johndoe....
Hope that helps.