I noticed while testing elgg that it creates the profile URL's example.com/profile/myUserName
I would like to know if it is possible to change the URL to example.com/myUserName
It makes it much more useful in the real world for a user to say "Find us on example.com/myUserName" than to say "Find us on example.com/profile/myUserName.
Other than make it easier for people to Market their product pages on your website, it also can drive traffic by marketing the fact that users should sign up immediately to reserve their preferred user name because myUserName is better than myUserName_1
I have not launched my site yet but the URL thing is fairly important to me.
Thanks.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
- Steve Clay@steve_clay
Steve Clay - 0 likes
- Avicena AlGhiffar Alsharaawy@AVicenaGhifa
Avicena AlGhiffar Alsharaawy - 0 likes
- iionly@iionly
iionly - 0 likes
You must log in to post replies.You could make a plugin that uses the [route, all] plugin hook (See e.g. http://learn.elgg.org/en/stable/guides/routing.html#the-route-plugin-hook) to check whether the first URL segment is a username. For the actual checking you can use the get_user_by_username() function. If no user is found, the handler would simply pass along the job to other route/pagehandlers.
There may even be an existing plugin that already does this. Not sure, though.
To make sure you don't break anything (a username "login") you want to register to handle unhandled routes (404s). I can't remember how Elgg does this.
MAybe you will need this plugin https://elgg.org/plugins/1091233
or this https://elgg.org/plugins/2428620
Also, those plugin will prevent users to make username like "login" , "blog" , "thewire" , etc
Profile URL plugin: https://elgg.org/plugins/1091233.
It doesn't show Elgg 2.0 and newer as compatible but maybe it still works. It's not using the [route, all] plugin hook, yet, but it shouldn't be too difficult to update. It also checks on registration of user accounts if the username is also blocked by an existing pagehandler (this won't help if you add a plugin at a later time and the username is already taken though).