I'm trying to completely replace the WordPress login/authentication actions and user session code (through the functions "exposed" in pluggable-functions.php) with my own (in that our systems all need to share a single user database).
I am writing a plugin (following the best practices) and am creating implementations for the following methods:
I understand the concepts quite well, but my problem is how exactly do I create the "user" object (WP_User???)
My existing users database has a "permissions" field which is a numeric value that I can derive if the user is an admin, or a regular user, etc. But I just need to know how to:
1. create the user object with the appropriate fields
2. establish the session so that WordPress recognizes the user logged in
I've been googling and searching the forums here and have found bits and pieces but haven't found something that makes it all fit together in one cohesive picture.
Any help, guidance, example code, whatever sure would be, well, helpful.