mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 04:06:36 +09:00
* fixed sending emails upon registration;
* fixed using `um_user( 'status' )` and `um_user( 'account_status' )` functions; * fixed using `set_status()` function; * based on https://github.com/ultimatemember/ultimatemember/pull/1564
This commit is contained in:
@@ -173,7 +173,7 @@ if ( ! class_exists( 'um\core\rest\API_v2' ) ) {
|
||||
$val->roles = $user->roles;
|
||||
$val->first_name = um_user( 'first_name' );
|
||||
$val->last_name = um_user( 'last_name' );
|
||||
$val->account_status = um_user( 'account_status' );
|
||||
$val->account_status = UM()->common()->users()->get_status( $user->ID );
|
||||
$val->profile_pic_original = um_get_user_avatar_url( '', 'original' );
|
||||
$val->profile_pic_normal = um_get_user_avatar_url( '', 200 );
|
||||
$val->profile_pic_small = um_get_user_avatar_url( '', 40 );
|
||||
@@ -221,6 +221,7 @@ if ( ! class_exists( 'um\core\rest\API_v2' ) ) {
|
||||
|
||||
switch ( $data ) {
|
||||
case 'status':
|
||||
// Force update of the user status without email notifications.
|
||||
UM()->common()->users()->set_status( $id, $value );
|
||||
$response['success'] = __( 'User status has been changed.', 'ultimate-member' );
|
||||
break;
|
||||
@@ -325,7 +326,7 @@ if ( ! class_exists( 'um\core\rest\API_v2' ) ) {
|
||||
$response['profile_pic_small'] = um_get_user_avatar_url( '', 40 );
|
||||
break;
|
||||
case 'status':
|
||||
$response['status'] = um_user( 'account_status' );
|
||||
$response['status'] = UM()->common()->users()->get_status( $user->ID );
|
||||
break;
|
||||
case 'role':
|
||||
//get priority role here
|
||||
@@ -346,7 +347,7 @@ if ( ! class_exists( 'um\core\rest\API_v2' ) ) {
|
||||
$val->roles = $user->roles;
|
||||
$val->first_name = um_user( 'first_name' );
|
||||
$val->last_name = um_user( 'last_name' );
|
||||
$val->account_status = um_user( 'account_status' );
|
||||
$val->account_status = UM()->common()->users()->get_status( $user->ID );
|
||||
$val->profile_pic_original = um_get_user_avatar_url( '', 'original' );
|
||||
$val->profile_pic_normal = um_get_user_avatar_url( '', 200 );
|
||||
$val->profile_pic_small = um_get_user_avatar_url( '', 40 );
|
||||
|
||||
Reference in New Issue
Block a user