Hi,
sorry this is not possible.
This is something that you need to manage with some Cron process, because the age value is not static (
i.e. today I have 39 years old, tomorrow 40)
With our APIs you can build a simple plugin that check this, but this check come only when user Register or Update his profile (docs with example plugin at
http://docs.easy-profile.com/index.php/article/triggers)
- Download, Install and Enable Skeleton Plugin
- remove samples functions: triggerFieldAvatarUpdate, triggerProfileUpdate
- add function like this:
public function triggerProfileUpdate($user,&$data,$changed,$isNew)
{
$aliasOfFieldBirthday='dob'; // replace with your Alias of Birthday field
$groupToAdd=10; // replace with ID of usergroup
$birthDate=JHtml::_('date', $data[$aliasOfFieldBirthday], 'm/d/Y','UTC');
$birthDate = explode("/", $birthDate);
$age = ( date( "md" , date( "U", mktime( 0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2] ) ) ) > date( "md" ) ? ((date( "Y" )-$birthDate[2])-1 ) : ( date( "Y" )-$birthDate[2] ) );
if ( $age > 40 ) JsnHelper::addUserToGroup( $user , $groupToAdd );
}
NOTE: This code is not tested and not supported, this is only for example purpose.