zanematthew/zm-ajax-login-register — pull request #87 by s3w47m88 (2014-11-11 02:19:32+00:00)
Title: New Feature: Registrant Can Choose Role

Hi Zane,

Great Plugin and thank you for making it freely available! We use it on our WordPress Multi-Site installation and needed to extend it for a customer. That's what this Pull Request is regarding.

Our customer had two types of Users two register, and they needed new registrants to choose their Role. In their case it was either a Model or a Client. So we extended ZM AJAX Login Register to provide this functionality.

We did two things:
1. Displayed an HTML Select (dropdown) containing User Roles on the front end Registration form so the registrant can select what their role is at the time of registration.
2. Added two Options in the Settings menu for the Plugin. The first controls whether or not that Select is displayed, which it is not by default. The second allows the Administrator to specify what Roles will appear in that Select (since allow Registrants to register as an Administrator is an obvious security risk.

I, personally, wrote this code. I have been programming for ten years but I don't have a formal education. So if you find my code to be sub-par I welcome your feedback and will be happy to revise it accordingly. We *don't* want to be running our own fork of your Plugin and that is why we're submitting it to the core via this Pull request.

FYI, I did not do a version bump.

Thanks for your time!