Unable to login with correct password
Unable to login with correct password
Unable to login with correct password
/* Add code below wp_set_auth_cookie( $user->ID, true, false ); */ $current_user = wp_get_current_user(); if($current_user->roles[0]==’personal_account’){ wp_redirect(site_url(‘/profile’)); }else if($current_user->roles[0]==’corporate_user’){ wp_redirect(site_url(‘/corporate-profile’)); }
Blocking the direct access to images in the upload folder WordPress
You can use a CDN to serve the content to users from the closest server to them.
You should use curl method. Here is a brief explaination: So you have a form in your abc.com site (no need for iframe) then you should use $_POST method to send the data to a page you have created before and includes your curl php codes. On the other server you should have created a … Read more
Since the file is in your theme directory, WordPress may not want the user to “directly” access it. Why not create a Page in wordpress, assign a Template Name to your PHP page and then assign that to the new page created in wordpress. For example, you would have a new page called “Members Only” … Read more
You can read cookies both on the front- and back-end sides. For the front-end, you have to provide both links, and show only the desired one with javascript. Use document.cookie.indexOf(‘cookie_name’) to check the cookie presence. For the back-end, you can read the special $_COOKIE variable to check the cookie presence in you template and change … Read more
I don’t know that I would use cookies for this as the user could just modify their cookie to match their current IP. You could store the user’s IP as user meta at signup and then compare that to their IP during subsequent logins via the wp_authenticate_user filter. Sample code (untested): add_action( ‘user_register’, ‘wpse157630_add_user_ip’, 10, … Read more
WordPress is not a platform for SSO, and do not include any API to support such a use case. You can develop a JSON end point to validate users, but the work flow you describe will probably not match it.
You need to debug the main issue first wp-config.php define(‘WP_DEBUG’, true); define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_DISPLAY’, false); functions.php // define the wp_mail_failed callback function action_wp_mail_failed($wp_error) { return error_log(print_r($wp_error, true)); } // add the action add_action(‘wp_mail_failed’, ‘action_wp_mail_failed’, 10, 1); For more detail read this article LINK