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

Subscribe to our news:
Partners
Testimonials
Kirby Foster: "Nice software. Small, lightweight, works well. I evaluated lots of software before deciding that your software worked the best for what I do. Both Maestro for MySQL and PHP Generator have saved me lots of time".
Steven Langfield: "I wanted to drop you a mail to say how freaking AMAZING your software is. It will be the best £100 I have ever spent. I have still to read all your documentation to take full advantage but what you have created is truly amazing".

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