When a web user signs in, I used to see on my homepage ’Welcome userfullname’, but now I am unable to call [+ufn+] for some reason. This is the snippet:
<?php
$type =$modx->getLoginUserType();
if(!empty($type) )
{
print ’Welcome [+ufn+]’.$modx->runSnippet(’getusername’).’ | ’;
}
?>
Now it just prints ’Welcome’ and nothing else. What I am missing?
-
☆ A M B ☆
- 2,213 Posts
You can also use the Personalize snippet to show one chunk to logged-in users and another to the rest.
I use this in the logged in chunk:
<p>You are logged in as [+user+]</p>
and a link to the login page in the other chunk.
I like the GreetByName snippet, but for some reason it isn’t finding the correct time. It is now 2 pm but it puts Good Morning. I found in the Tools where to modify time in relation to server...is there somewhere else that I need to modify the time?
-
☆ A M B ☆
- 2,213 Posts
I am unsure how the time is detected so I don’t know what if any changes would be needed. I suspect it’s using the server time to establish the saying. I would check what time your server is set to use.