Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

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 Admin

    I just wrote a comment which would fit here as well...
    https://open.vanillaforums.com/discussion/comment/247041/#Comment_247041

  • @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 Admin

    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.