<div dir="ltr"><div>I´m trying to create a user via api running this script but I get as error "
<b>Fatal error</b>: Uncaught Error: Class "Vtiger_Module_Model" not
found in ../modules/Vtiger/handlers/CheckDuplicateHandler.php:35"</div><div><br></div><div>Does some one achieve this before? Im using vtiger 7.5 with php 8.1</div><div><br></div><div><?php<br><br>require_once 'modules/Users/Users.php';<br>$user_email='<a href="mailto:new_user@yourdomain.com">new_user@yourdomain.com</a>';<br>$role_id_to_assign='H1';<br>$user = new Users();<br>$user->column_fields["last_name"] = 'John';<br>$user->column_fields["user_name"] = 'Mee2';<br>$user->column_fields["status"] = 'Active';<br>$user->column_fields["is_admin"] = 'off';<br>$user->column_fields["user_password"] = $user_password;<br>$user->column_fields["tz"] = 'Europe/Berlin';<br>$user->column_fields["holidays"] = 'de,en_uk,fr,it,us,';<br>$user->column_fields["workdays"] = '0,1,2,3,4,5,6,';<br>$user->column_fields["weekstart"] = '1';<br>$user->column_fields["namedays"] = '';<br>$user->column_fields["currency_id"] = 1;<br>$user->column_fields["reminder_interval"] = '1 Minute';<br>$user->column_fields["reminder_next_time"] = date('Y-m-d H:i');<br>$user->column_fields["date_format"] = 'dd-mm-yyyy';<br>$user->column_fields["hour_format"] = 'am/pm';<br>$user->column_fields["start_hour"] = '08:00';<br>$user->column_fields["end_hour"] = '23:00';<br>$user->column_fields["imagename"] = '';<br>$user->column_fields["internal_mailer"] = '1';<br>$user->column_fields["activity_view"] = 'This Week';<br>$user->column_fields["lead_view"] = 'Today';<br>$user->column_fields["email1"] = $user_email;<br>$user->column_fields["roleid"] = $role_id_to_assign;<br>$new_user_id = $user->save("Users");<br><br>?></div></div>