mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed submitted info;
- fixed approve user notification;
This commit is contained in:
@@ -1214,12 +1214,14 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
||||
?>
|
||||
*
|
||||
*/
|
||||
function approve() {
|
||||
function approve( $repeat = true ) {
|
||||
$user_id = um_user('ID');
|
||||
|
||||
$status = get_user_meta( $user_id, 'account_status', true );
|
||||
if ( 'approved' === $status ) {
|
||||
return;
|
||||
if ( ! $repeat ) {
|
||||
$status = get_user_meta( $user_id, 'account_status', true );
|
||||
if ( 'approved' === $status ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
delete_option( "um_cache_userdata_{$user_id}" );
|
||||
|
||||
@@ -672,8 +672,10 @@ add_filter( 'um_profile_field_filter_hook__','um_profile_field_filter_xss_valida
|
||||
* @return mixed
|
||||
*/
|
||||
function um_submit_form_data_trim_fields( $post_form, $mode ) {
|
||||
foreach ( $post_form as &$field ) {
|
||||
$field = trim( $field );
|
||||
foreach ( $post_form as $key => $field ) {
|
||||
if ( is_string( $field ) ) {
|
||||
$post_form[ $key ] = trim( $field );
|
||||
}
|
||||
}
|
||||
|
||||
return $post_form;
|
||||
|
||||
Reference in New Issue
Block a user