We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4041
    • 788 Posts
    Information:

    * Front end:

    - Webuser signs up for an account using the WebSignup snippet form.
    - Websignup_activate_plugin intercepts the OnWebSaveUser event when the new user is created via the front end
    signup form.
    - A temporary value is set in the new users web_user/cachepwd field and an activation email is sent to the user
    with activation details.
    - Webuser is redirected to the activation form document.
    - Webuser fills out activation form (correctly), web_user/cachepwd field is cleared and the webuser is allowed to login.
    - Auto login setting to automatically log the webuser in upon successful submit. If the webuser has a login_home setting,
    they redirect there, otherwise they go to $success_redirect_id. (* to use this feature, you must have the
    weblogin.processor.inc.php file in its default installed location * )
    - Attempts to login before the account is activated result in the webuser being redirected to the activation form document.
    - Optional: Add a login_home setting for all new webusers.
    - Optional: set a login_home setting depending on which webgroup of which the webuser is a member.
    - Optional: ( 12232012 ) pre-populate the activation code field in the activation form
    - Optional: ( 12232012 ) hide the activation form field
    - Optional: ( 01232013 ) allow auto verify account when user visits the link sent in activation email ( not real sure how safe this feature is )


    * Backend Manager:

    Create New Webuser:
    - Websignup_activate intercepts the OnWebSaveUser event when the new webuser is created.
    - An activation email is sent to the webuser with the activation details.
    - Set the "notify" method to onscreen to avoid duplicate emails.

    Manager Home Page:
    - If there are inactive accounts and the manager user has web_user_edit permission, a new tab is created on
    the manager home page with a list of the inactive accounts.
    - Depending on permissions, from the home screen the manager user can:
    Activate all inactive accounts
    Purge all inactive accounts
    Go directly to the user account via username link

    Edit User screen:
    - If a webuser account is inactive and the manager has web_user_edit permission, a notice section will be shown
    at the top of the webuser edit screen with account created / purge date info.
    - If the manager has web_user_save permission, a link to activate the account is available.
    - If the manager has web_user_edit permission, a link to resend the activation email is available. Note that the
    webusers password is also reset during this operation.

    Enable logging:
    - adds system events logging for:
    accounts registered
    accounts activated
    emails sent
    purge acccounts
    activate accounts

    Auto Purge inactive accounts:
    Setting a value in the $enable_purge setting will enable auto purge and remove any accounts which exceed this value.
    Purge check is triggered when the manager home page is loaded if the maanger has web_user_edit permission.
    - Note the $enable_purge setting is in seconds, see examples in the plugin code.

    Unzip the attached file and see the README.txt for installation information.

    ** Updated 08/01/2013 - newest version: 08012013 [ed. note: breezer last edited this post 13 years, 1 month ago.]
      xforum
      http://frsbuilders.net (under construction) forum for evolution
      • 40024
      • 72 Posts
      Another awesome work!And so quickly too!I just tested it on a site i am building on localhost(xampp) again,and i have to say these:

      1)the plugin is perfect!Finally a solution to making new users automatically login after sign up,and an email activation implementation for modx evolution!

      2)at first,i had a few issues.The [+websignup_activate_output+] placeholder was getting "eaten" by the phx plugin.I don't know why,i just deactived phx and everything worked out ok.

      3)In order for the plugin to work, the activation resource page must be set as
      NON CACHEABLE! (i have also set it as non-searchable because i don't want it to appear on my sitemap,but i am not sure if it was a right choice).

      4)There is a small issue with two messages:if a user deactivates/deletes his account and then types the activation page's url,then he gets both messages: "$wbsgnp['lang']['account_already_active']" and
      "$wbsgnp['lang']['account_not_found']",while he should get only the
      "$wbsgnp['lang']['account_not_found']" message.
      Not much of an issue though.

      If i come up with anything else i will let you know smiley
      Again,thanks for this excellent contribution to the modx project laugh.
        • 4041
        • 788 Posts
        Thanks for the kind remarks and feedback smiley

        I updated the first post with a new zip ( 11302012 ) with fixes to the issues listed above , grab the zip with the newest date/version. ( for some reason I could not remove the older attachment ) [ed. note: breezer last edited this post 13 years, 10 months ago.]
          xforum
          http://frsbuilders.net (under construction) forum for evolution
          • 40024
          • 72 Posts
          Sorry for taking too long to respond,i was a bit busy smiley
          i tested the latest version, and only the last, minor issue remains: if a user deactivates his account after he has activated it and presses "back" on the browser,he sees two messages:
          1)"No account information was found" (which is the "$wbsgnp['lang']['account_not_found']").
          2)"Your account is already activated" (which is the "$wbsgnp['lang']['account_already_active']").

          But as i said before,i hardly consider that an issue.Who would delete his account and then go to the activation page?And even so,at least he gets the message "No account information was found". The second message ("Your account is already activated") shouldn't confuse him at all smiley
            • 4041
            • 788 Posts
            Maybe not an issue but it certainly classifies as a glitchlet and makes my forehead wrinkle lol

            Try adding the following to line 55 (which should be blank at the moment) in websignup_activate.OnParseDocument.php

            return;


            When removing file attachments are straightened out I'll update the zip in the first post.
              xforum
              http://frsbuilders.net (under construction) forum for evolution
              • 40024
              • 72 Posts
              That did solve the problem!
              However, i spotted a new issue, which might have been there all along, just i hadn't noticed it yet (i hope you don't shoot me in the end tongue ).
              I am using the WebLoginPE v.1.3.1 snippet for creating user profiles, and i noticed that after a user is activated, if he goes to his profile page and performs an action, i get a system event error report which says:"Redefining already defined constructor for class WebLoginPE".

              My call is: [!WebLoginPE? &type=`profile` &dateFormat=`%d/%m/%Y`!]

              I tried these solutions:
              https://forums.modx.com/thread/1225/wlpe-error-redefining-already-defined-constructor-for-class-webloginpe

              https://forums.modx.com/index.php?topic=29016.0

              https://forums.modx.com/thread/44549/solved-redefining-already-defined-constructor-for-class-webloginpe

              but i had no luck so far. [ed. note: dinpapa last edited this post 13 years, 9 months ago.]
                • 4041
                • 788 Posts
                Unfortunately I don't know anything about weblogingpe, and it appears you are experiencing a common problem.

                I can only suggest disabling the websignup_activate plugin and go through the create user motions without it and determine if the activate plugin is really the issue.
                  xforum
                  http://frsbuilders.net (under construction) forum for evolution
                  • 40024
                  • 72 Posts
                  You were right,that issue had nothing to do with the websignup_activate plugin. I found the solution about this issue and i am going to post it to the webloginpe forums. If you like, i can delete those comments of mine that have to do with the webloginpe, so this thread is entirely about the websignup_activate plugin smiley


                    • 40024
                    • 72 Posts
                    Now, i have noticed another minor issue: Even though i have set "$enable_logging = FALSE;",
                    i still get the "websignup_activation_email" event log. The other event logs don't appear just fine, but this one does.Again,this not much of an issue,especially for sites with few users,but for sites with thousands of users that log would fill the database. Is there any way to disable that event log as well?
                      • 4041
                      • 788 Posts
                      Good catch, in websignup_activate.plugin.php:

                      on lines #153 & #213 change TRUE to $enable_logging

                      ex:
                      websignup_activate_email( $replace, TRUE, ...

                      websignup_activate_email( $replace, $enable_logging, ...
                        xforum
                        http://frsbuilders.net (under construction) forum for evolution