function auth0_update_fields_and_roles in Auth0 Single Sign On 7.2
Update the field mappings and role mappings for a user based on auth0 user data
1 call to auth0_update_fields_and_roles()
- auth0_login_auth0_user in ./
auth0.module - Log in an Auth0 authenticated user.
File
- ./
auth0.module, line 398
Code
function auth0_update_fields_and_roles($user_info, $uid) {
function_exists('dd') && dd($user_info, 'auth0_update_fields_and_roles called');
$the_user = user_load($uid);
function_exists('dd') && dd($the_user, 'the_user before updates');
$edit = array();
auth0_update_fields($user_info, $uid, $the_user, $edit);
auth0_update_roles($user_info, $uid, $the_user, $edit);
function_exists('dd') && dd($edit, 'values to edit');
user_save($the_user, $edit);
//cache_clear_all('menu:'. $uid, TRUE);
function_exists('dd') && dd(user_load($uid), 'the_user after updates');
}