Anyway, a quick fix for you would be to edit the CB file "administrator/components/com_profiler/comprofiler.class.php" on line 3804.
Replace:}Code:if ( $reason != 'register' ) { $where[] = 't.useraccessgroupid IN (' . implode(',',getChildGIDS(userGID( $_CB_framework->myId() ))) . ')';
By:Code:if ( $reason != 'register' && empty($fieldIdOrName)) { $where[] = 't.useraccessgroupid IN (' . implode(',',getChildGIDS(userGID( $_CB_framework->myId() ))) . ')'; }
I don't have enough knowledge on CB code to guarantee you it's not gonna have a negative impact on other parts of CB (I don't think so but...)
Now about the long term fix, I would be happy if you could ask the CB team... Maybe they will apply directly this fix on the next CB release if they also think that getting a field by its ID should not add any ACL check. Or they may have an other solution...
Please Log in or Create an account to join the conversation.
Never make core edits. It voids your support and we can no longer help you. In addition to that the change breaks the entire retrieval of fields. It's import that the API respects permissions.They've suggested a change in the CB code to allow newsletters to fetch values:
Don't agree; it's designed to support either/or and depending on the situation only 1 or the other maybe available without having to do a DB query to retrieve the other.if they also think that getting a field by its ID should not add any ACL check.
Where he's using getField he can specify a reason of "register", "adminfulllist", or set the $fullaccess variable to true. Example as follows.Or they may have an other solution...
Please Log in or Create an account to join the conversation.
Where he's using getField he can specify a reason of "register", "adminfulllist", or set the $fullaccess variable to true.
This is indeed what I was talking about with the "reason : register" but...
$myfield = $cbUser->getField( $fieldIdorName, null, 'html', 'none', 'register' )
This one will remove the ACL verification but will add a "f.registration = 1" which I guess means the field should be configured to be displayed on the registration page, which won't be the case.
$myfield = $cbUser->getField( $fieldIdOrName, null, 'html', 'none', 'adminfulllist' )
This one won't remove the ACL when we load the field
$myfield = $cbUser->getField( $fieldIdOrName, null, 'html', 'none', 'profile', 0, true )
Same thing for this one, it does not change anything.
Ideally it's best to just pass content through $cbUser->replaceUserVars( $CONTENT ) and use substitutions inside of your content as you can then specify whatever reason, etc.. you want wherever it's needed.
I'm all ready to use whatever function is adapted... I'm gonna have a look at it tomorrow.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.