I was wondering using phpx how do I check and see if the user is logged in or not. If he is logged in do something and if not do something else.
There are several snippets that will do this faster (Personalize is one). Personalize shows one chunk to logged-in users and another to the rest:
[!Personalize? &yesChunk=`name_of_logged_in_chunk` &noChunk=`name_of_other_chunk`!]
MODx comes with the Personalize snippet so you should be able to just use the tag above.