Code:
$userID = record\findOne('User', 'createdAt', 'desc', 'firstName=', firstName, 'middleName=', middleName, 'lastName=', lastName); assignedUserId = $userID; assignedUserName = record\attribute('User', $userID, 'name');
$userID = record\findOne('User', 'createdAt', 'desc', 'firstName=', firstName, 'middleName=', middleName, 'lastName=', lastName); assignedUserId = $userID; assignedUserName = record\attribute('User', $userID, 'name');
$emailAddress = string\substring(entity\attribute(emailAddress), 0); $userName = string\match($emailAddress, '/([^@]+)/'); $password = password\generate(); $hash = password\hash($password); $userId = record\create( 'User', 'userName', $userName, 'password', $hash 'emailAddress', $emailAddress ); $emailBody = string\concatenate( 'Username: $userName', 'Password: ' ); $emailId = record\create( 'Email', 'to', $emailAddress, 'status', 'Sending', 'subject', 'Access info', 'body', $emailBody, 'isHtml', false ); ext\email\send($emailId);
Leave a comment: