The attached patch makes it possible to link directly to a user's Content Profile from the RealName. It creates a new option "Link to content profile" on the RealName administration page, which defaults to off. Unless this option is set, everything should work as before. The order of preference for the link destination is homepage, Content Profile, user page.

I rewrote most of realname_username(), so this patch should be tested extensively before being used in production. Feedback would be appreciated.

Note: this patch depends on #1635842: realname_content_profile_get_types() should return types instead of names also being applied.

Comments

ChrisLaFrancis’s picture

Removed a couple of extraneous newlines.

ChrisLaFrancis’s picture

Changed a variable name.

ChrisLaFrancis’s picture

Corrected an error in the logic for whether an access check was performed on the Content Profile when returning the path. Also, created a separate function [realname_get_name()] for the code from realname_username() that actually determined what value to use as the user's name, as this could be useful in other places.

hass’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)