Get In Touch
MEDPIKE
info@medpike.com
Work Inquiries
job@medpike.com

update role WP to UM

function updateRole($user_id){
// Get UM role
$role = get_user_meta( $user_id, ‘role’, true );

// Set WordPress role for same user
$wp_user_object = new WP_User( $user_id );
$wp_user_object->set_role( $role );

$subject = “Update role ” . $role;
$message = “User ID ” . $user_id . ” ” . “Role ” . $role . ” “;

wp_mail(‘youremail.com’, $subject, $message);
}

Author avatar
miguel
https://blog.medpike.com

Post a comment

  • Tureporti

    Radiology Second Opinions
    Tureporti
    Understanding radiology reports
    HIPAA ready
  • Radiolapp

    AI RIS-PACS On Demand
    Radiolapp
    Pay As You Go RIS-PACS
    AI included
© 2022, MEDPIKE. Made with passion by MEDPIKE.
All right reserved.
We use cookies to give you the best experience.