How do I use the user login API
-
I’ve trying in vain to use the login API. Please can someone help?
I have created a user login page which consists of a login section and a register section. It’s kind of working except for successful logins!!
My login function is:
[code moderated] Please use a pastebin or ensure code is correctly posted inside backticks as indicated in the reply form.the originating form points the user at their info page. It checks validity by calling is_user_logged_in() which in turn checks $current_user.
The problem is that when I click on a link the user is no longer logged in!! $current_user has been reset.
So what black art does WP use in it's own login forms / pages that makes $current_user stick?
- The topic ‘How do I use the user login API’ is closed to new replies.