- fixed redirect after registration;

- removed empty set_roles() function;
- added function for checking AMP;
This commit is contained in:
nikitasinelnikov
2020-10-02 15:48:59 +03:00
parent 042be3351a
commit e26a6a33ab
5 changed files with 34 additions and 14 deletions
+1 -1
View File
@@ -564,7 +564,7 @@ add_filter( 'um_before_save_filter_submitted', array( UM()->validation(), 'valid
* @param $to_update
*/
function um_restore_default_roles( $user_id, $args, $to_update ) {
if ( ! empty( $args['submitted']['role'] ) ) {
if ( ! empty( $args['submitted']['role'] ) && ! empty( $to_update['role'] ) ) {
$wp_user = new WP_User( $user_id );
$role_keys = array_map( function( $item ) {