Two factor plugin wordpress - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Friday, June 4, 2021

Two factor plugin wordpress

I used two factor plugin for my site wordpress. I tried to change some function. I added two sentence with newline using \n in the param $message but i receive in email one sentence. This function :

public function generate_and_email_token( $user ) {
$token = $this->generate_token( $user->ID );


$subject = wp_strip_all_tags( sprintf( __( 'Your login confirmation code for %s', 'two-factor' ), get_bloginfo( 'name' ) ) );

$message = wp_strip_all_tags( sprintf( __( 'Your verification code is: %s.\n','We ask you to receive our best regards.' , 'two-factor' ), $token ) );


$subject = apply_filters( 'two_factor_token_email_subject', $subject, $user->ID );


$message = apply_filters( 'two_factor_token_email_message', $message, $token, $user->ID );

return wp_mail( $user->user_email, $subject, $message );
}

I would change string function with another function But i don't know.

Any help!!



source https://stackoverflow.com/questions/67827402/two-factor-plugin-wordpress

No comments:

Post a Comment