Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] CB Profile SEF Url with userid instead username

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 6 months ago - 11 years 5 months ago #224866 by dotcom22
hello

Instead to get a SEF url who look by default like this:

www.site.com/my-profile/userprofile/myusername

I would prefer for privacy reason get this:

www.site.com/my-profile/userprofile/123

I tested and in practice is possible to access to profile using user ID instead username (such this: www.joomlapolis.com/my-profile/userprofile/12345 ) but I wondering if a settings somewhere allow to set this by default..

thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Last edit: 11 years 5 months ago by krileon.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #224911 by krileon
There's no parameter to change it to user id. You'd need to edit our router.php file and adjust how it rewrites profile URLs.


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.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 6 months ago #225040 by dotcom22
I know you are not very happy to provide trick for hack CB core file, however could you tell me how to make this modification please ?? I don't know where is the code to modify and how...

many thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 6 months ago #225067 by krileon
In comprofilerBuildRoute under userprofile switch case there is an is_numeric IF check. Remove that chunk of code as inside that if check is where it translates user id to username. Beyond that I can't help, sorry, as we don't 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.

  • userpic36
  • userpic36
  • OFFLINE
  • Posts: 27
  • Thanks: 2
  • Karma: 1
11 years 5 months ago #227613 by userpic36
Replied by userpic36 on topic CB Profile SEF Url with userid instead username
For your information I have exactly the same need:
we want to get the user_id in the SEF url, instead of the username (for both privacy and safety, because the username is a key to log-in into the user account).

Even the user real_name would be better than the username.

I note the way to do this by hack (thank you), but it would be much better to have this as a configuration parameter.

thank you

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

Moderators: beatnantkrileon
Powered by Kunena Forum