Hi,
Validation
You can set a format allowed in Text Field Option, set following parameters:
Format: Custom
Custom Format: [0-9]{3}-[0-9]{2}-[0-9]{3}
Custom format works with regex sintax
Email with Code
Easy Profile don't do this, But you can do something like this:
admin approval
- Enable Admin approve by setting parameter "New User Account Activation" to "admin", you will find this parameter at Administration->Users->Manage->Options (button)
- Now when user register on your site then he need admin approval
email with code
you can't send the code in admin approval email, but you can send a second email with user data. To do this you need to write simple plugin by using our APIs (docs with example plugin at
http://docs.easy-profile.com/index.php/article/triggers)
- Download, Install and Enable Skeleton Plugin (you will find it at
http://docs.easy-profile.com/index.php/article/triggers)
- Open file /plugins/jsn/skeleton/skeleton.php
- remove samples functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- add function like this:
public function triggerProfileUpdate($user, &$data, $changed, $isNew)
{
if($isNew)
{
// Start body of email
$body=$user->name." registered on your site. \n\n";
// Add fields to body email
foreach($changed as $fieldalias){
$body.=$fieldalias .": ". $data[$fieldalias] ."\n";
}
// Send Email
$result=JFactory::getMailer()->sendMail(
$user->email, // Sender Mail
$user->name, // Sender Name
'[email protected]', // Receiver Mail
'User Registered', // Subject Mail
$body // Body Mail
);
}
}
this example function send a email with all user data.
NOTE:
This code is not tested and not supported, this is only for example purpose.