Forums | Mahara Community

Support /
Cleanurls: Generated User URLs based on First&LastName


Mario Gharib's profile picture
Posts: 26

12 January 2016, 21:55

Dear maharares

With CleanUrls, by default, user URLs are generated based on usernames,

Does anyone knows how to generate these URLS to be based on First&LastName instead of username?

 

It is essential to us to generate urls based on First&LastName because our server is LDAP, and usernames are digital,

For example: my username is 712299 so my url is:

https:// mahara.usj.edu. lb/user/712299 (based on username)

So that is why I want it to be based on my full name:

https:// mahara.usj.edu. lb/user/mario-gharib (based on First&LastName)

 

Your assistance would be a great beenfit

Mario Gharib.

Aaron Wells's profile picture
Posts: 896

15 January 2016, 14:15

Hi Mario,

I saw the full details of your situation on the other thread: https://mahara.org/interaction/forum/topic.php?id=7479

I took a look at the code, and it looks like this is a bug in the clean URL system in Mahara. If you have "Never show usernames" turned on, it should be generating the clean URLs using the user's firstname & lastname (or preferredname) rather than their username. And the code that generates clean URLs for profiles when you do "regenerate clean URLs" does just that.

However,  the code that generates clean URLs for profiles on account creation, does not. It just creates them based on the username.

I've filed a bug about it in our bug tracker: https://bugs.launchpad.net/mahara/+bug/1534398

Unfortunately, because clean URLs and "Never show usernames" are both fairly uncommon settings, it's not likely we at Mahara HQ will get around to fixing this one immediately as part of our community support. But if you've got some PHP coders at your institution, that bug lists the places in the code that need to be changed to fix this issue. (Or if you'd like to hire us at Catalyst to do it, take a look at our Mahara support packages page: https://www.catalyst.net.nz/what-we-offer/learning-and-development/mahara-support-packages )

Cheers,

Aaron

2 results