Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.3 fully supports PHP 7. Get it now!

Can applicant approval request be done via email?

Rather than the admin logging into the board and going to the applicant list, can't the approval be done via email?

Answers

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator
  • @R_J said:
    I just wrote a comment which would fit here as well...
    https://open.vanillaforums.com/discussion/comment/247041/#Comment_247041

    do you mean about being willing to do some programming?

    Where do I find the function that processes the candidate request?

    thank you

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Do you know how to extend Vanilla? If yes, you can skip this paragraph, but if not you really should (by now) read this paragraph only! Vanilla is extended by adding files, not by changing them. So if you have no idea how to do so, get a copy of the example plugin up and running and proceed.

    I would use the UserModels AfterRegister hook to send the mail. That mail should contain some link to yourforum.com/plugin/approvebymail/userid/jlkdasauhgaiutdasdigduzdsguuzdf76iguzd...

    That long garbage code should be a hashed mixture of some random value and maybe the users mail address - at least that's what I would use. Since that link would never needed to be typed in anywhere it could be long and ugly.

    This long key must be stored somewhere. I would choose the User tables Attributes column.

    Then you have to create that plugin endpoint and everything that has to be done there is to check whether that long hashed code can be found in the Attributes of the user identified by the id. If yes, use make a call to the UserModels approve() method.
    It's up to you if you do a permission check and only allow admins to accept applicants or if that link would be working even if the one calling it isn't logged in into the forum.

Sign In or Register to comment.