New user registration requires admin authorisation

Posted on 2011-10-08
Last Modified: 2012-05-12
I've a Register/login/Logout process working well with all stored in Mysql.
I'd like to add that when a new user registers :-
They receive an email link which is used to prove the email address.
The admin receives and email to make the choice of allowing the new user access.
I think this is a pretty typical CMS system.

What is the best way to add the extra processes.
Question by:encodeme
    LVL 13

    Accepted Solution

    PHP has a built in mail feature.  You might need some help getting it working but please read this  so that you at least understand theory.  You might want to use a different method of sending mail but knowing the native way that PHP sends mail would be good.  (Sometimes mail sent by PHP gets blocked in spam filters)

    Since a human will decide to grant access, the from address of the e-mail you send should be a real address that is monitored by the admin.

    Finally, you can make a form that accepts e-mail address and updates the Y/N access flag.  I suggest this be somewhat advanced.  The admin types in or copy/pastes the e-mail and submits.  The CGI (PHP) looks up the record in mySQL and shows you some information (such as name) and then has a checkbox to let you change the permission level.  (You might choose to ban someone who previously had access).  I can help you with this but my solution is complicated and you'd have to change it.  (I used it as part of my final project in a Web Dev class).

    I expect you'll have a lot of questions related to this task.  For now, I'm just giving you the overview.

    I will be out most of today but other experts should be around.

    Author Comment

    Hi, Many thanks,
     I'll start to go down that route and report back.

    Author Closing Comment

    Thanks again for the direction.
    I've  got a working solution now, and will try refine it.
    LVL 13

    Expert Comment

    by:Hugh McCurdy
    Great.  Glad it worked.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    The viewer will learn how to dynamically set the form action using jQuery.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now