Fix reset password process

This commit is contained in:
champsupertramp
2016-09-14 19:56:00 +08:00
parent bdb1bb87d3
commit 95cec21471
+7 -1
View File
@@ -7,7 +7,13 @@
function um_reset_password_process_hook( $args ) {
global $ultimatemember;
$user = $_POST['username_b'];
$user = null;
foreach ( $_POST as $key => $val ) {
if( strstr( $key, "username_b") ){
$user = trim( $val );
}
}
if ( !is_email( $user ) ) {
$data = get_user_by( 'login', $user );