Send An Email To The Site Admin When A New User Is Created Excluding Certain Roles

When you run an eCommerce or membership site you can have a lot of user created on your site for legitimate purposes. For that reason I usually unhook all user creation emails and replace that with the below code. This allows me to get a new user email for all except customers and subscribers. The code also includes the user role. In combination with the code at this link I can track users creation and role changes.

Members can access the code below.

To access this content, you must purchase Code Ninja Membership.