you’re missingfrom your registration call&groups=`Pending Users`
$pendingGroups = isset($pendingGroups) ? $pendingGroups : 'Pending Users';
[!WebLoginPE? &type=`register` ®Type=`pending` ®isterTpl=`registerForm` ¬ifyTpl=`notifyMessage` ¬ifySubject=`S7 website registration - pending` ®SuccessId=`50` ®SuccessPause=`0` ¬ify=`apc@######.plus.com`!]
[!WebLoginPE? &type=`register` ®Type=`pending` ®isterTpl=`registerForm` ¬ifyTpl=`notifyMessage` ¬ifySubject=`S7 website registration - pending` ®SuccessId=`50` ®SuccessPause=`0` &pendingGroups=`knock knock` ¬ify=`apc@########.plus.com`!]
http://obblaricum.textdriven.com/blog?wlpeID=&service=activate&userid=11&activationkey=kn7qLhaKzb
$url = $modx->config['server_protocol'].'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$modx->makeURL($activateId,'',"&wlpeID=".$this->WlpeId."&service=activate&userid=".$this->User['id']."&activationkey=".$newPasswordKey);
$activateId = (!empty($activateId) ? $activateId : $modx->documentIdentifier);
function __construct($LanguageArray, $dateFormat = '%A %B %d, %Y at %I:%M %p', $UserImageSettings = '105000,100,100', $type = 'simple', $paging = 3000, $id='')
{
require_once 'manager/includes/controls/class.phpmailer.php';
$this->LanguageArray = $LanguageArray;
$this->DateFormat = $dateFormat;
$this->UserImageSettings = $UserImageSettings;
$this->Type = $type;
//Added by Taff
$this->Pagination = $paging;
$this->WlpeId = $id;
}
My approveNewUser chunk then has a field
<input type="hidden" name="usergroup" value="S7 member" />
Note the name of this field matches the groupsField parameter. I just made the field hidden because any user approved will go into the "S7 member" group and it kept the form clean. When I use the approve user button the user gets moved into the new group and gets an email notifying them that their account has been activated. I dare say if you wanted to select the destination group then the form could have radio buttons instead. I presume that whatever you define the value of this field must match a defined group when the form is posted.
I’ve still to sort out details and test when a registration is rejected, or approving multiple users at once. In the meantime I hope this helps.
Adrian
<input type="hidden" name="usergroup" value="Registered Users,[+view.kindgroep1+],[+view.kindgroep2+]" />
[!WebLoginPE? &type=`register` ®Type=`pending` ®isterTpl=`registerForm` ¬ifyTpl=`notifyMessage` ®SuccessId=`53` &groups=`Pending Users` ®SuccessPause=`0` ¬ify=`[email protected]` ®Required=`email,fullname` &customFields=`fullname, gender, username, email, address, city, zip, state, country, phone, fax, business_type, subscriber, comment` &inputHandler=`Tick this box if you currently subscribe to EBM:userSubscriber:subscriber:checkbox:()||Business Type:userBusiness:business_type:select:Distributor(distributor),Farrier(farrier),Manufacturer(manufacturer),Media(Media),Equestrian Professional - Please Specify(equestrian_professional),Retailer(retailer),Trade Organisation(trade_organisation),Wholesaler(wholesaler),Veterinary(veterinary)` !]
[!WebLoginPE? &type=`manager` &activateId=`2` &groupsField=`usergroup` &usersList=`The following accounts require approval:default:approveNewUser:username:ASC:webgroup(Pending Users)`!]
[+wlpe.message+]
<div id="wlpeUser">
<form enctype="multipart/form-data" id="wlpeUserProfileForm" action="[~[*id*]~]" method="POST">
<fieldset id="wlpeUserProfileInput">
<div id="wlpeUserInfo">
<p id="wlpeProfileInfo" class="info">Use this form to approve [+view.username+]'s registration</p>
</div>
<legend>[+view.username+]'s User Profile</legend>
<!-- These hidden fields are IMPORTANT! -->
<input type="hidden" name="internalKey" value="[+view.internalKey+]" />
<input type="hidden" name="username" value="[+view.username+]" />
<input type="hidden" name="usergroup" value="Business Members" />
<label for="wlpeUserProfileFullName">Full Name
<input id="wlpeUserProfileFullName" type="text" name="fullname" value="[+view.fullname+]" />
</label>
<label for="wlpeUserProfileEmail">Email
<input id="wlpeUserProfileEmail" type="text" name="email" value="[+view.email+]" />
</label>
</fieldset>
<fieldset id="wlpeUserProfileButtons">
<button type="submit" id="wlpeApproveUserButton" name="service" value="approveuser">Approve</button>
<button type="submit" id="wlpeProfileDoneButton" name="service" value="cancel">Done</button>
<button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteuserprofile">Delete This Profile</button>
</fieldset>
</form>
</div>
Can you see anything wrong there at all?
My issues are:
1) When a user registers their password and username is being sent to them instantly - this should not happen
2) clicking approve int he manager profile page does nothing at all.