Glad itâ€™s helped to some degree! To get it working is the next stage. First I must say Iâ€™m still learning the ropes on modx so my suggestions might not be advice, Iâ€™ll I can say is what Iâ€™ve found to work.
Lets go through a check list
1. Have you created a web users group called â€™Pending Usersâ€™? When someone registers then pending users get added to this group, you should be able to go into the manager and see if new applicants get added to the group. If this doesnâ€™t work then the rest of the process falls over.
2. On your activate new members chunk do you have something along the lines of
<input type="hidden" name="usergroup" value="club member" />
, again the defined value "club member" needs to be a web user group that youâ€™ve already defined. When you approve the new applicant they will get moved from the "Pending Users" group to the "club member" group. You can change these names if you want to but they do need to be defined web user groups.
3. Finally I think the call for approval of new members needs to have an extra couple of fields.
[!WebLoginPE? &type=`manager` &activateId=`40` &groupsField=`usergroup` &usersList=`The following accounts require approval:default:approveNewUser:username:ASC:webgroup(Pending Users)`!]
The value of the groupsField parameter needs to match the hidden field name in step 2 above, and the usersList parameter is filtering for all members in the webgroup â€™Pending Usersâ€™). Hopefully one of these last two parameters will supply the necessary attributes value. I suspect itâ€™s the groupsField link to the hidden input field in step 2. I believe you can define multiple groups in the value, in which case the for each loop in your code error is the looping around each group listed.
I hope this helps.