We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26482
    • 138 Posts
    Hi x0149128, I think I’ve confused you. I’ve tried 3 versions of the registration call and version 2 is the one you describe.

    I’ll try on a sandbox site tonight.
    Thanks.
      • 1892
      • 82 Posts
      Quote from: x0149128 at Jan 11, 2010, 08:55 AM

      you’re missing
      &groups=`Pending Users`
      from your registration call

      Sorry but I don’t think that’s how it works looking at the code. I think if you don’t define any groups then by default it adds pending registration to the "Pending Users" group.

      From the webloginpe.snippet.php it sets the variable pendingGroups
      $pendingGroups = isset($pendingGroups) ? $pendingGroups : 'Pending Users';


      This is my calling code, note no mention of any groups, this defaults to "Pending Users".

      [!WebLoginPE? &type=`register` &regType=`pending` &registerTpl=`registerForm` &notifyTpl=`notifyMessage` &notifySubject=`S7 website registration - pending` &regSuccessId=`50`  &regSuccessPause=`0` &notify=`apc@######.plus.com`!]


      Now if I want to overide the group initially allocated to the pending registration then I need to add &pendingGroups to my call, I’ve just tested the following on my system and this puts pending requests into the group "knock knock"

      [!WebLoginPE? &type=`register` &regType=`pending` &registerTpl=`registerForm` &notifyTpl=`notifyMessage` &notifySubject=`S7 website registration - pending` &regSuccessId=`50`  &regSuccessPause=`0` &pendingGroups=`knock knock` &notify=`apc@########.plus.com`!]


      You may notice that I over ride the registerTpl form - I haven’t sorted out the plugin to access the default forms yet so I set up my own chunk called registerForm and copied the defaultRegisterVerifyFormTpl.html.txt code into my chunk.

      I hope this helps.
      Adrian
        • 26482
        • 138 Posts
        Hi apcherry and x0149128,

        I’ve created a new sandbox site with 1.0.2, the repo-1242.zip (webloginpe) from the Extra section and the Apr-2009 addon from the GoogleCode site and this part works.

        Thanks for your help.

        I do have another issue. After I approve an account, the user gets the an email with an activation link and a temporary password.

        1. What is the name of the template that is used for this email?
        2. How is the activation link generated? On my sandbox site, there is a /blog. The activation link is
        http://obblaricum.textdriven.com/blog?wlpeID=&service=activate&userid=11&activationkey=kn7qLhaKzb
        . However, there is no reference in the registration page to this /blog.
        3. Clicking the actication link doesn’t do anything. It brings you to the blog page, but nothing further.
        4. Worse, logging in after clicking the activation url, using the temp password from the email, leads to an ’Incorrect username or password error’.
        5. Where can I see that a web account still needs activation?

        The activation url looks like:
        $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);


        and $activateId is set to
        $activateId = (!empty($activateId) ? $activateId : $modx->documentIdentifier);


        which to me would indicate that the url should point to the current ID (of the registration page). Correct?


        Thanks again.

        EDIT: I just figured out that the activation link is missing the wlpeID! It’s empty in above activation link.

        The only reference to the ID is in the construct function:
        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;
        	}


        Any idea why this is empty?
          • 26482
          • 138 Posts
          Partially solved most of the issues. I added an &id=`1` to my WebLoginPE calls, which is then transferred to the activation link and I had &activateId=`2` in my call, which is the ID of the /blog page kiss

          I’ve created a login page with a simple WebloginPE call. The activation link is sent to this page, which then transforms the login form to an activation form!

          Still working on some other issues, but getting there slowly but surely!

          Thanks.
            • 26482
            • 138 Posts
            Solved it!

            For reasons beyond me, the activation form wasn’t shown if the activation link contained the well-formed & splitters. Only if changed to &, the activation form is shown. Luckily this is easily changed in tools/config.

            Is this a bug or a feature?
              • 4429
              • 429 Posts
              So i’m the only person this doesn’t work for.

              Exactly what version of WebloginPE are you using? The one in the repos or the one on google code?

              It could be that the one i’m using from the repos is no good.
                • 26482
                • 138 Posts
                Quote from: apcherry at Dec 29, 2009, 11:50 AM

                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


                In my manageProfileTpl template, I use
                 <input type="hidden" name="usergroup" value="Registered Users,[+view.kindgroep1+],[+view.kindgroep2+]" />
                
                to allow the user to be added to multiple groups. This works well, the user is added to the Registered Users groep and possibly also to the other two.

                Now, sometimes the user makes a mistake in the extra groups (fields kindgroep1 and kindgroep2) and the webmaster wants to change this. However, even if you make a change in the form field, the corrected value is not taken into account, and the user is not added to the correct group.

                I’ve tried changing [+view.kindgroep1+] to [+post.kindgroep1+], but that didn’t work out.

                Any ideas?
                  • 4429
                  • 429 Posts
                  Ok from the very start here is what i’m running:

                  Registration call:
                  [!WebLoginPE? &type=`register` &regType=`pending` &registerTpl=`registerForm` &notifyTpl=`notifyMessage` &regSuccessId=`53` &groups=`Pending Users` &regSuccessPause=`0` &notify=`[email protected]` &regRequired=`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)` !]


                  Manage user profile call:
                  [!WebLoginPE? &type=`manager` &activateId=`2` &groupsField=`usergroup` &usersList=`The following accounts require approval:default:approveNewUser:username:ASC:webgroup(Pending Users)`!]


                  here is my tlp for the manage user profile call:
                  [+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.
                    • 26482
                    • 138 Posts
                    Quote from: x0149128 at Jan 13, 2010, 03:36 AM


                    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.


                    I use 1.0.2, the repo-1242.zip (webloginpe) from the Extra section and the Apr-2009 addon from the GoogleCode site. I’m almost certain something is wrong in your WebLoginPE version.

                      • 4429
                      • 429 Posts
                      Hmmm.

                      This is very curious. As i’m running 1.2 with the latest 1.3.2 updates from Google Code. Just got the updates again, dropped the files into my webloginpe folder and insearted the new snippet code.

                      Still no change though.

                      When i click approve, my screen refreshes but the accounts are not moved into the Business Members group