Skip to Content Skip to Menu

🕒 Save Time and Effort with CB Editor Assistant: Effortlessly create and refine content in Joomla 3, 4, & 5.
🎁 Limited Offer: Enjoy a 5-day FREE trial and save up to 30% afterward!

[SOLVED] User Profile Link

12 years 1 month ago - 12 years 1 month ago #216943 by rosshennessy
[SOLVED] User Profile Link was created by rosshennessy
Hi,

I am using this to display the user profile link.

$_CB_framework->userProfileUrl( (int) $result )

It was showing the link like this: www.example.com/my-cb-profile/userprofile/Demo_User

But now it is showing as: www.example.com/my-cb-profile/userprofile/255

I have moved the site to a new server, and it looks like it has only happened since then.

Can anyone help with this please.

Thanks
Last edit: 12 years 1 month ago by krileon.

Please Log in or Create an account to join the conversation.

12 years 1 month ago #216946 by rosshennessy
Replied by rosshennessy on topic Re: User Profile Link
Found the problem.
If the username has an _ in the name it is unable to add it to the link.

Is there any workaround for this.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 1 month ago #216968 by krileon
Replied by krileon on topic Re: User Profile Link
Don't allow underscores, spaces, etc.. in usersnames is probably best solution. Alphanumeric is probably all you'll want to support, which can be done by editing the username field and setting "Authorized input:" to "Custom PERL regular expression" and specifying a "Perl Regular Expression:" of "/^[a-zA-Z0-9]+$/" (without quotes).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

12 years 1 month ago #216973 by rosshennessy
Replied by rosshennessy on topic Re: User Profile Link
The problem is there are about 200 users with an _

Is there any way to get it to work, without having to change all those Usernames.

Thanks

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48709
  • Thanks: 8319
  • Karma: 1447
12 years 1 month ago #216995 by krileon
Replied by krileon on topic Re: User Profile Link
I believe only way to change it is to edit our router.php file in components/com_comprofiler/ and change how it routes the profile URLs. I can't help you with this however as we do not support core edits.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

12 years 1 month ago #217013 by rosshennessy
Replied by rosshennessy on topic Re: User Profile Link
Thank you for pointing me in the right direction.

Now working.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum