mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 14:43:49 +09:00
- increase security via option for Password field in user account;
This commit is contained in:
@@ -65,13 +65,15 @@ if ( ! class_exists( 'um\core\Account' ) ) {
|
||||
|
||||
foreach ( $arr as $id => $info ) {
|
||||
|
||||
if ( ! empty( $args['tab'] ) && $id != $args['tab'] )
|
||||
if ( ! empty( $args['tab'] ) && $id != $args['tab'] ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$output = $this->get_tab_fields( $id, $args );
|
||||
|
||||
if ( ! empty( $output ) )
|
||||
$tabs_structed[$id] = $info;
|
||||
if ( ! empty( $output ) ) {
|
||||
$tabs_structed[ $id ] = $info;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -518,8 +520,9 @@ if ( ! class_exists( 'um\core\Account' ) ) {
|
||||
UM()->fields()->editing = true;
|
||||
|
||||
if ( ! empty( $this->tab_output[$id]['content'] ) && ! empty( $this->tab_output[$id]['hash'] ) &&
|
||||
$this->tab_output[$id]['hash'] == md5( json_encode( $shortcode_args ) ) )
|
||||
$this->tab_output[$id]['hash'] == md5( json_encode( $shortcode_args ) ) ) {
|
||||
return $this->tab_output[$id]['content'];
|
||||
}
|
||||
|
||||
switch ( $id ) {
|
||||
|
||||
@@ -607,6 +610,10 @@ if ( ! class_exists( 'um\core\Account' ) ) {
|
||||
$args = str_replace(',user_email','', $args );
|
||||
}
|
||||
|
||||
if ( UM()->options()->get( 'account_general_password' ) ) {
|
||||
$args .= ',single_user_password';
|
||||
}
|
||||
|
||||
/**
|
||||
* UM hook
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user