protected function crumbs_MultiPlugin_EntityFindSomething::userFind in Crumbs, the Breadcrumbs suite 7.2
Parameters
stdClass $user:
Return value
array
1 call to crumbs_MultiPlugin_EntityFindSomething::userFind()
- crumbs_MultiPlugin_EntityFindSomething::find in lib/
MultiPlugin/ EntityFindSomething.php
File
- lib/
MultiPlugin/ EntityFindSomething.php, line 117
Class
Code
protected function userFind(stdClass $user) {
$candidates = array();
foreach ($this->weights as $rid => $weight) {
if (!empty($user->roles[$rid])) {
$role = $user->roles[$rid];
$parent = $this->plugin
->entityFindCandidate($user, 'user', $role);
if (!empty($parent)) {
$candidates[$role] = $parent;
}
}
}
return $candidates;
}