Page 1 of 1

Vtiger Integration

PostPosted: Tue Sep 22, 2009 12:01 am
by rfidler
Hello,

I've synchronized vtiger (5.0.3) that came with the default installation of viciDialNow using the 'sync' page (Admin --> System Settings) in ViciDial and it says the synchronization went well but I cannot for the life of me log into vtiger... ideas? I'm just using my admin user from vicidial to login - vtiger should be updated - right?

Thanks!

Randall

p.s. Vtiger 5.0.3

PostPosted: Wed Sep 23, 2009 1:04 am
by heinz
Hi,
please check the vtiger_users table if the admin entry is there.
If it's not there - go to vicidial->users and submit the admin details so it synchronizes again.

Check the vtiger_users2group table if there is a corresponding entry for the admin user.

Check mysql and httpd logs for error messages while synchronizing.

Thanks,
heinz

PostPosted: Wed Sep 23, 2009 11:00 am
by rfidler
I checked the database and the users are there... one thing I don't understand thought is we have in vicidial a user 1000, in the vtigerusers table there is a user with id of standarduser but a last name of 1000.

When I see the sync results, it appears to have the correct update sql statements and the db tables look like they have vicidial updated information in them, although it doesn't look like that information is in the correct fields to me.

I haven't checked the group table, I'll do that for sure but have a feeling it's fine.

Thanks!

Randall

PostPosted: Wed Sep 23, 2009 11:05 am
by rfidler
It appears that the admin user is in the marketing group (id 2) and ViciDial Admin group (id 4) according to the vtiger_users2group table.

PostPosted: Wed Sep 23, 2009 11:27 am
by rfidler
Ok, I restored a the DB backup take before syncing vtiger and vicidial, I can login with admin:admin... so it appears that 'sync' is what screws things up. I'll try sycning again against the backup db...

Besides setting up the sync via vicidial admin ---> system settings, is there anything else that is required to sync the two? I've see mention of an 'integration' script out there but it was in the context of 5.0.4 vtiger... I found and executed one for 5.0.3 but it stated that it didn't do anything.

PostPosted: Wed Sep 23, 2009 4:04 pm
by rfidler
Ok, I have updated vtiger 5.0.3 to 5.0.4 and applied the vicidial integration script (part of the instructions found here http://www.vicidial.org/VICIDIALforum/v ... php?t=8779).

I have setup user 1000 with pass of 1234 (just in case) with the api option enabled but the same issue occurs... I can login BEFORE synchronization with default admin:admin but once I sync with Vicidial, nada.

Per the vtiger upgrade instructions, I changed the config.inc.php to have a default encoding of UTF-8 - are vicidial passwords in some other encoding?

PostPosted: Thu Sep 24, 2009 9:59 am
by heinz
What happens when you try to login?
Does it say wrong username/password or does the screen go blank?
Are you able to login with vicidial default admin account 6666/1234?

PostPosted: Thu Sep 24, 2009 11:29 am
by ykhan
Did you apply the patch after upgrading to Vtiger 5.0.4? If not then go to the Vtiger folder under /var/www/html/vtigercrm and then:

wget http://www.eflo.net/files/Vtiger504_vicidial.patch
patch -p1 < ./Vtiger504_vicidial.patch

PostPosted: Fri Sep 25, 2009 2:05 pm
by rfidler
I first upgraded vtiger from 5.0.3 to 5.0.4 then applied the patch file which integrates vtiger with vicidial.

PostPosted: Fri Sep 25, 2009 2:06 pm
by rfidler
"What happens when you try to login? "

It just says wrong user name and password, the screen does not go blank.

Isse with the way the password are copied across

PostPosted: Fri Oct 09, 2009 4:55 am
by sanecode
it seems that the way the passwords are hashed by vicidial and vtigercrm are different. after poking around in vtigercrm source, i have written a small php script that resets all the passwords to the username. e.g. admin password is set as admin. here is the php script. when I get time later I will look at the process being folllowed for the synchronization and try to submit a patch. Just save this file as resetvtigerpass.php or something, and run it from the commandline like:
$php resetvtigerpass.php

Code: Select all
<?php
        echo "starting reset of vtiger passwords\n";

        mysql_connect("localhost", "root", "vicidialnow");
        mysql_select_db("vtigercrm503");
        $sql = "select user_name from vtiger_users";
        $result1 = mysql_query($sql);
        while($record = mysql_fetch_assoc($result1))
        {
                $username = $record["user_name"];
                $salt = substr($username, 0, 2);
                $password = crypt($username, $salt);
                $sqlu = "update vtiger_users set user_password = '$password' where user_name = '$username'";
                mysql_query($sqlu);
        }

        mysql_close();
?>

PostPosted: Sat Oct 10, 2009 2:23 pm
by rfidler
Thanks, I'll give it a try and let ya know if it worked for me.