Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
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".

More

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.

 

Signature:

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

                                       &$allowRegistration, &$errorMessage)

 

Parameters:

$username

The name of the user.

$email

The email of the user.

$password

The password of the user.

$allowRegistration

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

$errorMessage

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

 

Example

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

 

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

   if ($emailDomainName == 'mailinator.com') {

      $allowRegistration = false;

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

  }

 

 



Prev Return to chapter overview Next