-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Com_hierarchy changes to check if user have sub users #3
base: release-1.1.4
Are you sure you want to change the base?
Conversation
site/helpers/hierarchy.php
Outdated
$HierarchyModelHierarchys->setState('filter.user_id', $user_Id); | ||
$isManager = $HierarchyModelHierarchys->getItems(); | ||
|
||
return $isManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will retrun array and not boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, i have used this to retrieve users under the manager so can use in drop down filters. And if he has users under him then the user is the manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then change the function name.. getSubUsers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need to check if the previous function name is used anywhere? If yes,you will need to change it to this new one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the purpose of this helper ? Why are we adding more things to helpers instead of removing ? Cant you simply use the models for this ?
No description provided.