Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Made it possible to modify the getUser() query object.
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krämer committed Feb 16, 2016
1 parent 04c6553 commit fab2998
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Model/Behavior/UserBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,10 @@ protected function _getUser($value, $options = []) {
$query->where([$options['field'] => $value]);
}

if (isset($options['queryCallback']) && is_callable($options['queryCallback'])) {
$query = $options['queryCallback']($query, $options);
}

$result = $query->first();

if (empty($result)) {
Expand Down

0 comments on commit fab2998

Please sign in to comment.