I am creating user from entrypoint.
User account created successfully. But system generated password mail is not triggering.
I have updated “Enable System-Generated Passwords Feature:” in admin password management.
My entry point code
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
$user_name="entrypointuserlatest";
$user_hash='passwordVal@123';
$first_name='entry';
$last_name='point';
$email='entrypointuserlatest@mailionator.com';
$username_password = md5($user_hash);
$userNameValidate = BeanFactory::getBean('Users')->retrieve_by_string_fields(array('user_name'=>$user_name));
if($userNameValidate){echo "User Name Exits"; }
else {
$bean = BeanFactory::newBean('Users');
$bean->user_name = $user_name;
$bean->user_hash = $username_password;
$bean->first_name = $first_name;
$bean->last_name = $last_name;
$bean->status = 'Active';
$bean->UserType = 'RegularUser';
$bean->email1 = $email;
$bean->new_password =$user_hash;
$bean->save(); //Save
$userRecordId = $bean->id;
echo $userRecordId;
}