- increase security via option for Password field in user account;

This commit is contained in:
nikitasinelnikov
2019-03-12 09:13:40 +02:00
parent 19ffd41e22
commit a199f35cc7
7 changed files with 120 additions and 84 deletions
+11 -4
View File
@@ -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
*