Skip to content
Snippets Groups Projects
Commit 8a2f13df authored by JediKev's avatar JediKev
Browse files

UserForm: Phone Field

This updates the Phone Field name back to `phone` and changes the flags
to make the variable name non-editable. This also adds a check for the
phone field on the User Form and if one exists adds it to the search.
parent 73f689d9
Branches
Tags
No related merge requests found
......@@ -73,12 +73,15 @@ class UsersAjaxAPI extends AjaxController {
return $this->search($type, $fulltext);
}
} else {
$users->filter(Q::any(array(
$filter = Q::any(array(
'emails__address__contains' => $q,
'name__contains' => $q,
'org__name__contains' => $q,
'cdata__phone__contains' => $q,
)));
));
if (UserForm::getInstance()->getField('phone'))
$filter->add(array('cdata__phone__contains' => $q));
$users->filter($filter);
}
// Omit already-imported remote users
......
......@@ -9,6 +9,11 @@
ALTER TABLE `%TABLE_PREFIX%faq_category`
ADD `category_pid` int(10) unsigned DEFAULT NULL AFTER `category_id`;
-- Phone Field `name` and `flags`
UPDATE `%TABLE_PREFIX%form_field`
SET `flags` = `flags` + 262144
WHERE `type` = 'phone' AND `name` = 'phone' AND `form_id` = 1 AND `id` < 10;
-- Finished with patch
UPDATE `%TABLE_PREFIX%config`
SET `value` = 'e7dfe82131b906a14f6a13163943855f'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment