public function set_role($role)
{
// Before remove all previous
$this->remove_all_caps();
parent::set_role($role);
// Flush user cache
wp_cache_delete($this->ID, 'users');
// Destroy the global
global $current_user;
unset($current_user);
unset($GLOBALS['current_user']);
// Reset as current
wp_set_current_user($this->ID);
}