The Mint pepper Nametags allows you to see what pages a member logged into your site has viewed. It does this by checking a cookie for the members username. ExpressionEngine sets various cookies by default, but they are not human readable.
The Mint Cookie Tag extension allows you to set a cookie when a member logs in, with their username as the value. Available for download.
Two questions though,
Is there any security issue with storing the member’s username in plain english in a cookie?
I had a problem using the built-in set_cookie function, and so have just used the PHP SetCookie. The code is below, what am I doing wrong with the built-in function (currently commented out)?:
function set_mint_cookie($row)
{
global $SESS, $FNS;
$cookie_value = $SESS->userdata['username'];
/*$FNS->set_cookie($this->settings['cookie_name'],$cookievalue,Time()+3600);*/
// not sure why this doesn't work
SetCookie($this->settings['cookie_name'],$cookie_value, Time()+3600);
}
Simon.
I’ve updated the extension to use a different extension hook to ensure that all logged in members get the cookie, not just ones that log in from when the extension is activated.
Further to previous post, I fixed the problem I noted in question 2.
Hey Simon. I just loaded it up on my site energyrace.com and it worked right off the bat. I had been having trouble getting Mint to recognize a cookie set by EE using the set cookie function. I think I had the path wrong. But your extension takes the pain out of it.
Thanks,
-Jay Barnes
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.