s2-auto-login MU plugin causing white screen
-
I am trying to use the s2-auto-login code to automatically login new signups. However, it is causing the white screen in the admin panel.
1. I have created a MU plugins folder inside wpcontent: https://screencast.com/t/kWZregCbmqWH
2. I have set the file permissions correctly: https://screencast.com/t/siUTczVr
3. I created a php file with the code recommended and inserted into the folder. https://screencast.com/t/PnRbtZ27Ky73
The code is
<?php add_action('ws_plugin__s2member_during_configure_user_registration', 's2_auto_login_after_registration'); function s2_auto_login_after_registration($vars = array()) { if(is_admin()) return; // Not when an Admin is creating accounts. wp_set_auth_cookie($vars['user_id'], FALSE, FALSE); // Log the user in. if(did_action('login_form_register')) // For <code>/wp-login.php?action=register</code> compatibility. c_ws_plugin__s2member_login_redirects::login_redirect($vars['login'], $vars['user']); $GLOBALS['_s2_auto_login_after_registration_vars'] = $vars; // For Pro Form compatibility. add_action('template_redirect', '_s2_auto_login_after_registration', 1); } function _s2_auto_login_after_registration() // Pro Form redirection handler. { $vars = $GLOBALS['_s2_auto_login_after_registration_vars']; c_ws_plugin__s2member_login_redirects::login_redirect($vars['login'], $vars['user']); }
Unfortunately, this causes the white screen in admin panel.
Any thoughts.
- The topic ‘s2-auto-login MU plugin causing white screen’ is closed to new replies.