function id_save_usermeta_array($user_id, $meta = array()) { foreach ($meta as $n => $v) { id_save_usermeta($user_id, $n, $v); } }
function id_SETTINGS_user_disconnect() { $current_user = wp_get_current_user(); $user_id = $current_user->ID; $fields = array('userKey' => get_option('id_userKey'), 'userid' => get_option('id_userID')); $queue = id_get_queue(); $op = $queue->add('user_disconnect', $fields, 'id_generic_callback'); $queue->ping(array($op)); $meta = array('id_username', 'id_displayname', 'id_email', 'id_userID', 'id_userKey'); foreach ($meta as $key) { id_save_usermeta($user_id, $key, null); } }