Returns user ID if found, None if not
"""
+ # Custom search method - overrides opt-in visibility, as it suggests
+ search_method = 'open-ils.actor.patron.search.advanced.opt_in_override'
limit = 1
sort = None
search_depth = 1
)
by_id = osrf_request(
- 'open-ils.actor', 'open-ils.actor.patron.search.advanced',
+ 'open-ils.actor', search_method,
auth, {'ident_value': {'value': user.ident_value, 'group': 0}}, limit,
sort, include_inactive, search_depth
).send()
return by_id[0]
by_email = osrf_request(
- 'open-ils.actor', 'open-ils.actor.patron.search.advanced',
+ 'open-ils.actor', search_method,
auth, {'email': {'value': user.email}}, limit,
sort, include_inactive, search_depth
).send()
return by_email[0]
by_usrname = osrf_request(
- 'open-ils.actor', 'open-ils.actor.patron.search.advanced',
+ 'open-ils.actor', search_method,
auth, {'usrname': {'value': user.usrname}}, limit,
sort, include_inactive, search_depth
).send()