Current Record: afterRegister #14

afterRegister() Trigger A trigger that can be implemented in the Application Delegate Class or the Table Delegate Class?, to be executed af...

Current Record: afterRegister #14

afterRegister() Trigger A trigger that can be implemented in the Application Delegate Class or the Table Delegate Class?, to be executed af...

afterRegister

[Permalink]

afterRegister() Trigger

A trigger that can be implemented in the Application Delegate Class or the Table Delegate Class?, to be executed after the registration form is saved. This can be used to perform some custom actions like emailing the administrator.

Signature

function afterRegister( Dataface_Record &$record ) : mixed

Parameters

Name Description
&$record A Dataface_Record object encapsulating the record that is being inserted in the users table for this registration.
returns Mixed. If this method returns a PEAR_Error object, then registration will fail with an error.

Example

<?php
class conf_ApplicationDelegate {
    function afterRegister(&$record){
        // mail the admin to let him know that the registration is occurring.
        mail('admin@example.com', 'New registration', 'A new user '.$record->val('username').' has registered);
    }
}

See Also

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2024 All rights reserved