This commit is contained in:
yura_nalivaiko
2018-05-11 10:53:29 +03:00
parent f7a9ab2785
commit 99a9ebde1f
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -118,7 +118,7 @@ function um_send_registration_notification( $user_id, $args ) {
$emails = um_multi_admin_email();
if ( ! empty( $emails ) ) {
foreach ( $emails as $email ) {
if ( um_user( 'status' ) != 'pending' ) {
if ( um_user( 'account_status' ) != 'pending' ) {
UM()->mail()->send( $email, 'notification_new_user', array( 'admin' => true ) );
} else {
UM()->mail()->send( $email, 'notification_review', array( 'admin' => true ) );
@@ -136,7 +136,7 @@ add_action( 'um_registration_complete', 'um_send_registration_notification', 10,
* @param $args
*/
function um_check_user_status( $user_id, $args ) {
$status = um_user( 'status' );
$status = um_user( 'account_status' );
/**
* UM hook
+4 -3
View File
@@ -47,7 +47,7 @@ if ( ! class_exists( 'UM_Menu_Item_Custom_Fields_Editor' ) ) {
if ( empty( $_POST['menu-item-db-id'] ) || ! in_array( $menu_item_db_id, $_POST['menu-item-db-id'] ) ) {
return;
}
//var_dump($_POST['menu-item-um_nav_roles']); exit;
foreach ( self::$fields as $_key => $label ) {
$key = sprintf( 'menu-item-%s', $_key );
@@ -55,7 +55,8 @@ if ( ! class_exists( 'UM_Menu_Item_Custom_Fields_Editor' ) ) {
// Sanitize
if ( ! empty( $_POST[ $key ][ $menu_item_db_id ] ) ) {
// Do some checks here...
$value = $_POST[ $key ][ $menu_item_db_id ];
$value = is_array( $_POST[ $key ][ $menu_item_db_id ] ) ?
array_keys( $_POST[ $key ][ $menu_item_db_id ] ) : $_POST[ $key ][ $menu_item_db_id ];
} else {
$value = null;
}
@@ -165,7 +166,7 @@ if ( ! class_exists( 'UM_Menu_Item_Custom_Fields_Editor' ) ) {
$id_attr = ' id="edit-menu-item-um_nav_roles-{{data.menuItemID}}_' . $k . '" ';
$for_attr = ' for="edit-menu-item-um_nav_roles-{{data.menuItemID}}_' . $k . '" ';
$html .= "<label $for_attr>
<input type='checkbox' {$id_attr} name='menu-item-um_nav_roles[{{data.menuItemID}}][]' value='{$k}' <# if( _.contains( data.restriction_data.um_nav_roles,'{$k}' ) ){ #>checked='checked'<# } #> />
<input type='checkbox' {$id_attr} name='menu-item-um_nav_roles[{{data.menuItemID}}][{$k}]' value='1' <# if( _.contains( data.restriction_data.um_nav_roles,'{$k}' ) ){ #>checked='checked'<# } #> />
<span>{$title}</span>
</label>";
}