I solved it by creating a snippet. Am sure there are other better alternative recipes to my approach. But will share anyways.
The snippet creates a placeholder that returns a parameter list with custom fields for WebloginPE.
If need be, it will have to be reproduced for other WebloginPE calls on the website if you need to distinguish users. I guess it can also be used for other snippets.
Suppose you have two Web user groups named "Individuals" and "Corporates" and you want different registration forms or details.
Create the snippet, call it
parambuilder, save the following code.
global $modx;
$paramList = ’’;//used to set the WebLoginPE prameters. you can place your default call for registration here.
if($modx->isMemberOfWebGroup(array("Individuals")))
$paramList = ’your parameter list for individuals according to WebloginPE documentation’;
elseif($modx->isMemberOfWebGroup(array("Corporates")))
$paramList = ’your parameter list for Corporates according to WebloginPE documentation’;
$modx->setPlaceholder(’webloginpeParams’,$paramList);
return;
place the snippet call before the WebloginPE call, wherever you want the comparison to be made e.g
[[parambuilder]]
[!WebloginPE [+webloginpeParams+]!]