Skip to Content Skip to Menu

How change profile URL in browser?

  • ktm640
  • ktm640
  • OFFLINE
  • Posts: 44
  • Thanks: 3
  • Karma: 0
8 years 3 weeks ago #289658 by ktm640
How change profile URL in browser? was created by ktm640
I found that in browser URL (profile view) display login username. I think It is not secure generate links from login username and my users don't want show them in public.
Is it possible to generate URL from profile name?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
8 years 3 weeks ago #289672 by krileon
Replied by krileon on topic How change profile URL in browser?
With CB 2.1.x there's a Profile URL (alias) field that a user can use to customize their profile URL. Aside from that no you can't change it from username. I suppose you could automate setting of that fields value using CB Auto Actions, but whatever value you set it to must absolutely be unique.


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.

  • ktm640
  • ktm640
  • OFFLINE
  • Posts: 44
  • Thanks: 3
  • Karma: 0
8 years 3 weeks ago #289724 by ktm640
Replied by ktm640 on topic How change profile URL in browser?
I install CB Auto Actions and try to configure (look attach). May be I don't quite understand plugin and make mistakes.

Can help me? I need to display in profile URL user id and name (not login name!)

Attachments:

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

  • AchLive
  • AchLive
  • OFFLINE
  • Posts: 253
  • Thanks: 14
  • Karma: 3
8 years 3 weeks ago - 8 years 3 weeks ago #289729 by AchLive
Replied by AchLive on topic How change profile URL in browser?
Hi, I hope I can help you with this:

Triggers:
OnAfterFirstLogin (if you want to set the field on the first access to the site, after registration)
or
OnBeforeUserProfileEditDisplay (if you want to set user profile before the change field of view)

Type
Field

User
User

ACL
All

CONDITIONS

[alias] = Empty

ACTION
FIELD [alias] SET
[cb:if middlename=""][firstname]-[lastname][cb:elseif middlename!=""][firstname]-[middlename]-[lastname][/cb:elseif][/cb:if]
In this way the alias value will be composed as [firstname]-[lastname] OR [firstname]-[middlename]-[lastname]
OR
[user_id]-[firstname]
Last edit: 8 years 3 weeks ago by AchLive.
The following user(s) said Thank You: ktm640

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

  • ktm640
  • ktm640
  • OFFLINE
  • Posts: 44
  • Thanks: 3
  • Karma: 0
8 years 3 weeks ago #289744 by ktm640
Replied by ktm640 on topic How change profile URL in browser?
Thanks AchLive!

I configure CB Auto Actions and now for new users I get ok url:
example: http://www...../.../...../185-test777

But for existing users after editing profile user ID display twice:
example: http://www...../.../...../184-184-mesoderma

How solve this? May be I do somewhere mistake?

Is it possible to change users login name url without editing users manually (it must be very huge work to edit manually all ~1500 users on my site)?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48711
  • Thanks: 8320
  • Karma: 1447
8 years 3 weeks ago #289747 by krileon
Replied by krileon on topic How change profile URL in browser?
Field action on triggers onAfterUserUpdate, onAfterUpdateUser, onAfterUserRegistration, and onAfterNewUser to ensure it's updated after frontend and backend profile update and registration. Leave User as Automatic and leave Access as Everybody. The problem is name is not unique and the alias must be unique. CB Auto Actions at this time does not enforce it being unique. Probably would be better to use a Query action so you can do an update query to the _comprofiler table to change the alias column only if whatever you're changing it to is unique (otherwise maybe increment it).


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.

Moderators: beatnantkrileon
Powered by Kunena Forum