By John Whelan on Tuesday, 12 August 2014
Posted in General Issues
Replies 8
Likes 0
Views 658
Votes 0
Is there any way to remove the userid from the profile URL without enabling the permalink option during signup? Or perhaps enabling but hiding it?
Hello John,

Unfortunately without the id, there's no way to determine the user's real alias due to the fact that url aliases are being replaced with - when the alias contains empty spaces, dashes or other fancy characters. There's no way to reverse it unfortunately.
·
Tuesday, 12 August 2014 12:39
·
0 Likes
·
0 Votes
·
0 Comments
·
OK. I understand and I can factor it into my workflow.
·
Tuesday, 12 August 2014 12:50
·
0 Likes
·
0 Votes
·
0 Comments
·
OK - so here's where the problem arises:

1) I register a user with username "test user $" - the URL is now mysite/profile/870-test-user
2) I change the permalink to mysite/profile/bigdog

Now it seems that all the following URLs direct to the user profile:
1) mysite/profile/870-test-user
2) mysite/profile/test-user
3) mysite/profile/bigdog

Is there a way to ensure that each user profile only maps to either a) the permalink chosen by the user, or b) the original URL with the userid?

In place of 'mysite' you can insert 'coinist.co' for a live example of this.
·
Tuesday, 12 August 2014 13:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello John,

There's actually no way to enforce this because:

1. It will be heavier on your site. Two additional SQL queries need to be executed to run checks if the current request is using the correct permalink.

2. You cannot change the behavior when ID-ALIAS is used. In fact, if you try to view http://coinist.co/profile/870-hello-world-testing-world , it would still work because the router file is looking at the [870] portion instead as that is the only way it can get the proper profile id.
·
Tuesday, 12 August 2014 13:17
·
0 Likes
·
0 Votes
·
0 Comments
·
OK. Can this cause a problem with SEO if for some reason Google sees all three URL's?

Incidentally, I came across this problem through the JReviews integration dropping userids from the URL's it creates in the stream. I just posted about the problem on their forum here: http://www.reviewsforjoomla.com/forum/index.php?topic=26917.0
·
Tuesday, 12 August 2014 13:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello John,

Since the profile is actually not visible publicly, I don't think you have to worry about SEO though?
·
Tuesday, 12 August 2014 18:38
·
0 Likes
·
0 Votes
·
0 Comments
·
The full profile is not visible publicly, but the mini profile is. Here's an example: https://coinist.co/profile/870-test-user

It is also accessible at the other links:

1) mysite/profile/870-test-user
2) mysite/profile/test-user
3) mysite/profile/bigdog
·
Wednesday, 13 August 2014 00:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello John,

I am sorry for the delay of this reply.

The full profile is not visible publicly, but the mini profile is. Here's an example: https://coinist.co/profile/870-test-user


If you do not want the mini header to display to your guest when they viewing a restricted user profile, then what you can do is to edit the file 'JOOMLA/components/com_easysocial/themes/wireframe/profile/restricted.php' and look for the below code at 14:


<?php echo $this->loadTemplate( 'site/profile/mini.header' , array( 'user' => $user ) ); ?>


and replace the above with:


<?php echo (JFactory::getUser()->guest) ? '' : $this->loadTemplate( 'site/profile/mini.header' , array( 'user' => $user ) ); ?>


Let me know if the above method work for you or not.

Hope this help and have a nice day
Sam
·
Wednesday, 13 August 2014 12:08
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post