mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- reviewed https://github.com/ultimatemember/ultimatemember/commit/446250a50a319e51178a5bf43bc80b6d72b1669b;
This commit is contained in:
@@ -224,6 +224,20 @@ if ( ! class_exists( 'um\frontend\Secure' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! $has_admin_cap ) {
|
||||
/**
|
||||
* Validate submitted raw data for banned metakeys.
|
||||
*/
|
||||
if ( ! empty( UM()->form()->post_form['submitted'] ) && is_array( UM()->form()->post_form['submitted'] ) ) {
|
||||
foreach ( array_keys( UM()->form()->post_form['submitted'] ) as $submitted_metakey ) {
|
||||
if ( UM()->user()->is_metakey_banned( $submitted_metakey ) ) {
|
||||
$has_admin_cap = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $has_admin_cap ) {
|
||||
UM()->common()->secure()->revoke_caps( $user );
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user