From c36fdf93939f70cd8efd86787431f9c20794d554 Mon Sep 17 00:00:00 2001 From: champsupertramp Date: Wed, 24 Aug 2016 20:14:22 +0800 Subject: [PATCH] Fix get user role --- core/um-short-functions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/um-short-functions.php b/core/um-short-functions.php index a812ec4c..5dcee7ff 100644 --- a/core/um-short-functions.php +++ b/core/um-short-functions.php @@ -1358,12 +1358,15 @@ function um_fetch_user( $user_id ) { default: $value = um_profile($data); - + if ( $ultimatemember->validation->is_serialized( $value ) ) { $value = unserialize( $value ); } if( $data == 'role' ){ + if( is_array( $value ) ){ + $value = implode(",", $value ); + } return strtolower($value); }