mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- password field initial commit;
This commit is contained in:
@@ -574,7 +574,8 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
|
||||
} elseif ( um_user( $key ) && $this->editing == true ) {
|
||||
|
||||
if ( strstr( $key, 'user_pass' ) ) {
|
||||
//show empty value for password fields
|
||||
if ( strstr( $key, 'user_pass' ) || $type == 'password' ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -3432,9 +3433,12 @@ if ( ! class_exists( 'um\core\Fields' ) ) {
|
||||
|
||||
if (isset( $data['in_group'] ) && $data['in_group'] != '' && $rule != 'group') return;
|
||||
|
||||
if ($visibility == 'edit') return;
|
||||
if ( $visibility == 'edit' ) return;
|
||||
|
||||
if (in_array( $type, array( 'block', 'shortcode', 'spacing', 'divider', 'group' ) )) {
|
||||
//invisible on profile page
|
||||
if ( $type == 'password' ) return;
|
||||
|
||||
if ( in_array( $type, array( 'block', 'shortcode', 'spacing', 'divider', 'group' ) ) ) {
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
@@ -218,6 +218,7 @@ function um_user_edit_profile( $args ) {
|
||||
|
||||
// loop through fields
|
||||
if ( ! empty( $fields ) ) {
|
||||
|
||||
foreach ( $fields as $key => $array ) {
|
||||
|
||||
if ( ! um_can_edit_field( $fields[ $key ] ) && isset( $fields[ $key ]['editable'] ) && ! $fields[ $key ]['editable'] )
|
||||
@@ -236,10 +237,15 @@ function um_user_edit_profile( $args ) {
|
||||
|
||||
} else {
|
||||
|
||||
if ( isset( $userinfo[ $key ] ) && $args['submitted'][ $key ] != $userinfo[ $key ] ) {
|
||||
$to_update[ $key ] = $args['submitted'][ $key ];
|
||||
} elseif ( $args['submitted'][ $key ] ) {
|
||||
$to_update[ $key ] = $args['submitted'][ $key ];
|
||||
if ( $array['type'] == 'password' ) {
|
||||
$to_update[ $key ] = wp_hash_password( $args['submitted'][ $key ] );
|
||||
$args['submitted'][ $key ] = sprintf( __( 'Your choosed %s', 'ultimate-member' ), $array['title'] );
|
||||
} else {
|
||||
if ( isset( $userinfo[ $key ] ) && $args['submitted'][ $key ] != $userinfo[ $key ] ) {
|
||||
$to_update[ $key ] = $args['submitted'][ $key ];
|
||||
} elseif ( $args['submitted'][ $key ] ) {
|
||||
$to_update[ $key ] = $args['submitted'][ $key ];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user