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

Subscribe to our news:
Partners
Testimonials
Olivier Auverlot: "At my work (a universitary computer research laboratory), I'm alone to create all applications and databases. I don't know how I could do all the work without it. It's really a very productive software. I can focus on the database schemas and create quickly the user applications with a minimal amount of code to maintain".
Simon Greener: "A lot of work went in to designing our application database. PHP Generator allowed us to build a fully functional, professional looking, and functionally powerful web application from that database. It has freed us from worrying about low level code, enabling us to focus on the business requirements of the customer. The support provided is excellent with staff quickly producing answers to questions ranging from newbie to simple or complex. I highly recommend the product".

More

Add your opinion

PostgreSQL PHP Generator 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