I think I see the problem. In order to update the registration, ClassExtender removes the extension package first. Unfortunately, removeExtensionPackage() is missing a sanity check and assumes that the setting exists so it's crashing PHP before the setting can be created.
I'll create a workaround.
&where=`{"Data.firstName:=":"Michael"}`
&groups=`group1,group2`
$groups = $modx->getOption('groups', $sp, null);
if (!empty($groups)) {
$groups = explode(',', $groups);
} foreach ($users as $user) {foreach ($users as $user) {
if (! empty($groups)) {
if (! $user->isMember($groups)) continue;
}I just released a new version of ClassExtender that doesn't care if the setting is there or not.
Susan has filed a bug report on the missing setting, and I added a note about a sanity check for removeExtensionPackage(), so the user should never have to worry about it again.
Unfortunately, user group data is somewhat complex and it's not easy to work it into GetExtUsers in its fastest form. I'll probably add it eventually.
Here's a quick way to get that functionality in GetExtUsers, though it will slow things down a little when you use it, since it's not the fastest method. Let me know how much it slows things down when you use it.
Add a &groups property to the snippet tag:
&groups=`group1,group2`
Add this at line 60 of the GetExtUsers snippet:
$groups = $modx->getOption('groups', $sp, null); if (!empty($groups)) { $groups = explode(',', $groups); }
And change line 81 from:
foreach ($users as $user) {
to:
foreach ($users as $user) { if (! empty($groups)) { if (! $user->isMember($groups)) continue; }
...
Add this at line 60 of the GetExtUsers snippet:
$groups = $modx->getOption('groups', $sp, null); if (!empty($groups)) { $groups = explode(',', $groups); }
And change line 81 from:
foreach ($users as $user) {
to:
foreach ($users as $user) { if (! empty($groups)) { if (! $user->isMember($groups)) continue; }
Call to undefined method userData_mysql::isMember() in ...--Filename and linenumber--
if (! $user->User->isMember($groups)) continue;
I think with the new version, that would have to be:
if (! $user->User->isMember($groups)) continue;