public function update($user_id)
{
if (!current_user_can('edit_user', $user_id)) {
return false;
}
if ($this->nonce && !$this->nonce->is_valid()) {
return false;
}
$value = $this->get_value();
return $value ? update_user_meta($user_id, $this->meta_key, $value) : delete_user_meta($user_id, $this->meta_key);
}