Log in/out specific user with ID
-
I am trying to get user ID from SMF forum cookie and log that user in wp.
This is the plugin that i created:
add_filter('authenticate','custom_login_check', 100); function custom_login_check($user) { if ( is_a($user, 'WP_User') ) { return $user; } $user = new WP_User(4); ob_start(); include 'kuki.php'; ob_end_clean(); $user = $member_id; return $user;
But i am getting error when trying to use wp-login.php.
Call to a member function has_cap() on a non-object in C:\…\wp-login.php on line 598
- The topic ‘Log in/out specific user with ID’ is closed to new replies.