Not sure if this is more of a bug report or support request:
Is it possible to enable the output of this field on a view to be re-written as a link to the User's account page?
I have the field option for 'use this field as a replacement for user login' checked, and so the user's account page is located at users/[firstname]-[lastname]
At the moment, I have a view with a user's picture and their full name. I'd like them both to link to the user's account page. The picture links to their profile perfectly as it provides the option to link it to the user's account page.
With this field, I tried to re-write it as a link to users/[user-firstname]-[user-lastname] which works for most, but some users have apostrophes in their name. For example, a user with the name Suzy O'Brien and login name of sobrien4's account page would be located at users/suzy-obrien, however when rewriting as a link, the field links to users/suzy-o%27brien which obviously doesn't exist. As this field also doesn't completely re-write the login name everywhere, linking it to users/[name] (being the user's login name) links to users/sobrien4 which also doesn't exist.
Is this fixable? It seems like it should only need an added option to link to user's account in views, like the core fields do. Or, at least some way of discarding non-alphanumeric characters in the token for links?
Comments
Comment #1
alan d. commentedWith this module, no, but you can easily do it with views.
Make sure that you have these fields
Name
UID
Either rewrite UID field or select another field of higher weight
In the field options popup rewrite options (checkbox that opens a new text area) for the field you pick, insert the following [see your views replacment patterns in the same popup to see the exact values]
<a href="user/[uid]">[field_name]</a>
And this should link to the nice URL, "users/bob-jones" or whatever you have set up.
If you get "user/123", install Global redirect module that redirects to the nice URL.
Reopen if you need more help
Comment #2.0
(not verified) commentededited to improve understandability