Title: Replacing Authentication Actions
Last modified: August 18, 2016

---

# Replacing Authentication Actions

 *  [blinder](https://wordpress.org/support/users/blinder/)
 * (@blinder)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/replacing-authentication-actions/)
 * Hello 🙂
 * 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:
 * `
    wp_login is_user_logged_in auth_redirect get_userdatabylogin get_userdata 
   get_currentuserinfo set_current_user
 * 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.
 * Thank you!

The topic ‘Replacing Authentication Actions’ is closed to new replies.

## Tags

 * [authentication](https://wordpress.org/support/topic-tag/authentication/)

 * 0 replies
 * 1 participant
 * Last reply from: [blinder](https://wordpress.org/support/users/blinder/)
 * Last activity: [19 years, 10 months ago](https://wordpress.org/support/topic/replacing-authentication-actions/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
