I think the wp_signon()
function is unable to set the login cookies because you are calling it after the page headers have being sent.
Try moving your auth code out of dlf_process()
and into a separate function like this:
function dlf_login() {
if ( isset( $_POST['dlf_submit'] ) ) {
dlf_auth( $_POST['login_name'], $_POST['login_password'] );
}
}
add_action( 'after_setup_theme', 'dlf_login' );
Related Posts:
- Last time a user logged in
- How can I allow access to multiple users, using the same login, at the same time?
- Multi-site User Sessions
- Change the login button on the login page
- How to update the delete user confirmation form?
- Custom ReCaptcha Login
- What is the proper way to apply the login_form_bottom filter?
- How to override wp-login.php
- Remove Links from Login page
- Modify custom Users Manage page
- How to Save Different Usermeta Fields According to User Role?
- Show newly added posts since last user login time /date
- setting a specific home page for logged in users
- Change “logged in” link in (you must be logged in to post a comment)
- Redirect to requested page after (custom) login
- Associate Page with User
- Set user loggin status?
- Customizing the default logout page of WordPress
- How do I remove the eye icon that shows visibility on login screen and reset password screen
- How can I add data to a custom column in the Users section of the wordpress backend?
- Unique User Account Number + Displayed Via Shortcode
- Custom Login and Registration form in Ajax
- Updating Custom WordPress User Meta Field via REST API
- How to pass external variables to the wp_new_user_notification_email filter?
- Creating user relationships
- WordPress custom login page
- Function to allow “Anyone can register”?
- Make custom user table column filterable
- Adding a login form that concatenates three fields into a username
- Add ‘Creator’ User Meta when adding user
- Properly customizing login/register form
- Follow me for WordPress blogs (multi-authors)
- Change the Labels of Users to Customers in Admin
- How to add an extra variable to login and authenticate it?
- Login/Logout Session Sharing – Multiple WordPress Installations
- Custom login with external provider iframe and data object
- Deep customization of wp-login.php
- Allow guests to use WP Customizer but disable save button
- Lost password empty field error redirect to custom login
- Users can only view their content from the front end
- Custom Log In Screen – Disable password recovery [duplicate]
- List top 5 authors with most posts
- A truely custom login page?
- Problem with custom user meta field
- Switch between WordPress websites easy for an end user
- Lost password and back to blog in same line
- Customizing Users in Admin Area
- I w’d like to know If there are simple solutions to integrate other CMSs to wordpress
- how to make a custom field readonly or disabled by user role?
- How to make wordpress use a non-wordpress users table?
- Delete a user from frontend
- Restrict content access to logged in users
- Custom login and registration forms
- loginout function customization
- URL and Site title outputting on Login page
- Is it possible to integrate a custom login feature with wordpress?
- Personalized Gallery what are my options?
- how or where wordress collect unlogged user session
- How to change the login page without a plugin and not only customizing logo and text around the form?
- Removing “Failed” query argument upon successful login
- Validate user login in php
- No plugin populate user information in to form
- How to block specific user id in custom login form?
- how to change the url rediction of the woocommerce login page of the flatsome theme for my own in wordpress?
- Invitation link to a site in multisite network does not work?
- How to change Login default blue admin color?
- Latest update broke my custom login CSS
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- Trouble with custom login page
- Wrap WordPress Login Form in custom Div
- Custom login doesn’t stay
- Check get_post value after wp-admin login
- where can i find the login page in wordpress and add my header to it
- How to display all post from the same current usermeta
- Highlight specific user with custom field value
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Change the functionality of wordpress users module in admin
- Pass the post ID
- Changing starting number of User ID
- Custom search by several options send on form not works
- User registration add user ID?
- How to create functions that affect only a specific user
- Show Site Name on WP login screen
- Create users via PHP
- Use wp_login_form function to login with a custom user table?
- how to manage Session in WordPress using custom login?
- Is it possible assign a secondary existing role to already existing one?
- Redirect all pages to the custom login page except for the registration page
- How to stop login for SPECIFIC users BEFORE a specified date
- User Query Multiple Orderby Clause
- Some data of one custom user profile is erased when I update another custom user profile
- moving server can not login
- Customize in category page
- How to get WordPress to accept the tag in articles (or other alternatives)
- My custom page template with is_user_logged_in() does not detect that I’m logged in
- How can I display a PHP foreach loop’s answers by AJAX
- Removing blank space below header [closed]
- Many Rewrite Parameters/Rules
- Custom Taxonomy Sort For a Custom Query
- Smarter Document Management links between three WordPress sites sought