Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('wp_login', array($this, 'knp_aci_login_check'), 1, 2);
- public function knp_aci_login_check( $user_login, $user ){
- $contact = $this->request->api_connect(
- 'contacts?filters[email]='.$user_login,
- 'GET'
- );
- if (wp_remote_retrieve_response_code( $contact ) == 200 ) {
- setcookie( 'ac-status', 'true', 365 * DAY_IN_SECONDS, '/', get_site_url() );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement