If you are reading this page you are probably as frustrated as I was that Community Builder gives you the useless message “Please log in or register to view or modify your profile.” if your user tries to view a page that requires registration. Why do I think this is useless? Well first let me preface this by saying, there very well may be a great solution to this problem that is just a few clicks outside of my view. If this is true please send me a comment to this post so I can help the community in general. Having said that, I researched this for a couple of hours, over a couple of days. Since I did not find something, for now, I will officially call this issue useless and stupid.
If my user wants to view/modify his profile (that is the page I am sending my user to, from the top menu), and they are not yet logged in, the default set-up of community builder should automatically forward my user to the login page. Or at least give me some Admin control of the statement the users sees. Here was my quick and dirty hack.
Find the default_language.php file, for me it was in this directory “componentscom_comprofilerpluginlanguagedefault_language”. Open that file and search for our phrase or search for the variable _UE_REGISTERFORPROFILE. Once you find it replace the following :
DEFINE(‘_UE_REGISTERFORPROFILE’,’Please log in or register to view or modify your profile.’);
DEFINE(‘_UE_REGISTERFORPROFILE’,’Please log in or register to view or modify your profile.<br><a href=”index.php?option=com_comprofiler&task=login&Itemid=55″>Click Here to Login</a>’);
Now at least the message will provide a link for your user to get to the login page.