• Is there any hook using which I can manually mark a user account verified?
    I am creating a custom plugin and at the time of sign-up based on some data I need to mark them verified and for others, activation mail should be sent.
    Any idea how can I achieve this?

Viewing 1 replies (of 1 total)
  • Plugin Author WPFactory

    (@wpcodefactory)

    Hi @pranbir ,

    Sorry for the delay.
    If you simply want to mark an user account as verified you could try this: update_user_meta( $user_id, 'alg_wc_ev_is_activated', '1' );

    If you want to check programmatically if a user is verified by his ID you could try this function: alg_wc_ev_is_user_verified_by_user_id( $user_id );

    If you want to use a hook to mark the user as verified you could try this filter: alg_wc_ev_is_user_verified
    An example:

    
    add_filter( 'alg_wc_ev_is_user_verified', function( $is_user_verified, $user_id ){
       // $is_user_verified = true | false
       return $is_user_verified;
    }, 10, 2 );
    

    Let me know if it helps ??

    • This reply was modified 3 years, 3 months ago by WPFactory.
Viewing 1 replies (of 1 total)
  • The topic ‘Hook for manual activation of specific user’ is closed to new replies.