Hot

الأربعاء، 8 فبراير 2017

Improve Security in Realia Registration


The problem with Realia registration form is the absence of  E-mail check in the database so many users can be registered with the same e-mail, I think it is a big problem. I suggest to resolve this problem by adding these lines of code to realia plugin.



  1. Go to wp-content/plugins/realia/includes/post-types/class-realia-post-type-user.php
  2. In line 256 add $user_mail = email_exists( $email );
  3. In line 264 add  
    if ( ! empty( $user_mail ) ) {
$_SESSION['messages'][] = array( 'danger', __( 'E-mail already exists.', 'realia' ) );
wp_redirect( $_SERVER['HTTP_REFERER'] );
exit();
}


This function is used to ensure that the E-mail address the user is attempting to register with has not already been registered.

    ليست هناك تعليقات:

    إرسال تعليق