This works, sorta. It pulls the users when logged in and shows the logout link. Perfect! But when the user is not logged in it just shows Welcome Logout. It seems to be skipping the conditional &Then.
It dawned on me that maybe the (anon) user was set to be logged in, but no joy. I have three sets of users, Admin, Member, and the Anon. So that is not it.
The strange thing about it is that I have a similar login in the side bar of the home page and it works perfect. The only difference is that it is based on TV's and chunks that swap if the users is logged in or not.
[[!Profile? &prefix=`modx.user.`]]
[[!If?
&subject=`[[+modx.user.id]]`
&operator=`EQ`
&operand=`0`
&then=`<span id="welcome">Not logged in.</span> <a href="[[~5]]">Login</a> <span id="welcome">Or Register</span> <a href="[[~115]]">Register</a>`
&else=`<span id="welcome">Welcome [[+modx.user.firstname]]<span> <a href="[[~1? &service=`logout`]]" title="Logout">Logout</a>`
]]