May 2017
Beginner to intermediate
536 pages
14h 25m
English
Take a moment to think carefully about our requirements and try to figure out what we have missed.
Actually, we didn't check the activation status on login. Therefore, any user will be able to log into the system without activating their account. Now, let's fix this issue by intercepting the authentication process with another built-in action called authenticate. First, we have to add the authenticate action to the constructor of the WPWAF_Login class, as shown in the following code:
add_filter( 'authenticate', array( $this, 'authenticate_user' ),30, 3 );
Next, we can look at the implementation of this function, as shown in the following code:
public function authenticate_user( $user, ...
Read now
Unlock full access