By Jeffncou - December 4, 2017 - edited: December 5, 2017

Currently if a person try’s to add a favourite and they are not logged in they see the message. "You must login to use this feature!"

This is achieved with the code:

$GLOBALS['WSF_LOGIN_REQ_MESSAGE'] = "You must login to use this feature!";  // This is displayed if the user tries to add a favorite and isn't logged in

Is it fairly straightforward to add a bit of extra functionality to this code?

I would like to direct the user to a login page. I'm thinking this could be done in one of two ways, Either:

1. as a url link in the message… You must login to use this feature [link]


2 as an action. When user clicks [close] go to url


Hi Jeff, 

Just saw this older post.  Sorry for the delay.  If you're still working on this you can checkout this code (and anywhere WSF_LOGIN_REQ_MESSAGE is referenced)

if (!$GLOBALS['CURRENT_USER'])        { $onClick = "alert('" .jsEncode($GLOBALS['WSF_LOGIN_REQ_MESSAGE']). "'); return false;"; }

You could change that $onClick to have any javascript you wanted in it.

Hope that helps!

Dave Edis - Senior Developer