Choose your database:
MS SQL Server
SQL Anywhere

Subscribe to our news:
Grey: "We're a two-person company, it's just me an my wife. I'm the technical guru, and she handles the business operations. I have to know a lot about MySQL, but that's much too technical for her. I have frequently had to setup CGI scripts (I code in Perl) so she can manage some of our tables (suppliers, manufacturers, etc).

I discovered PHP Generator a couple of days ago, tried the free version,and within a few hours I had purchased the Pro version (as well as SQL Maestro for MySQL).

Today I am completing the conversion of the last of my custom table managers to PHP Generator. This is eliminating several thousand lines of code that I don't have to support any more!

Thanks for this fantastic product".

Ran / Cole: "We bought the tool last week and want to say how much we love it. We've found it not only powerful, but very user friendly. We have used the tool to create an interface that manages our MySQL DB for different types of users".


Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

OnBeforeUserRegistration event

This event occurs before a user is registered.



function OnBeforeUserRegistration($username, $email, $password, 

                                       &$allowRegistration, &$errorMessage)




The name of the user.


The email of the user.


The password of the user.


A parameter to indicate whether user registration is allowed. Set $allowRegistration to false to reject the new user. Default value is true.


A message to be displayed if $allowRegistration == false.



The code snippet below demonstrates how to deny registrations for users with a email address.


$emailDomainName = substr($email, strrpos($email, '@') + 1);

   if ($emailDomainName == '') {

      $allowRegistration = false;

      $errorMessage = "It is forbidden to register with mailinator's emails";




Prev Return to chapter overview Next