[Vtigercrm-commits] [vtiger-commits] r9989 - in /vtigercrm/branches/5.0.3/soap: thunderbirdplugin.php vtigerolservice.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Dec 19 09:11:22 EST 2006


Author: richie
Date: Tue Dec 19 07:11:17 2006
New Revision: 9989

Log:
changes to fix assigned to problem from plugin

Modified:
    vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php
    vtigercrm/branches/5.0.3/soap/vtigerolservice.php

Modified: vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php
==============================================================================
--- vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php (original)
+++ vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php Tue Dec 19 07:11:17 2006
@@ -200,13 +200,15 @@
 
 function track_email($user_name, $contact_ids, $date_sent, $email_subject, $email_body)
 {
+	global $current_user;
 	global $adb;
+	global $log;
 	require_once('modules/Users/Users.php');
 	require_once('modules/Emails/Emails.php');
 
-	$seed_user = new Users();
-	$user_id = $seed_user->retrieve_user_id($user_name);
-
+	$current_user = new Users();
+	$user_id = $current_user->retrieve_user_id($user_name);
+	$current_user = $current_user->retrieveCurrentUserInfoFromFile($user_id);
 	$email = new Emails();
 	//$log->debug($msgdtls['contactid']);
 	$emailbody = str_replace("'", "''", $email_body);
@@ -220,7 +222,6 @@
 	$email->column_fields[activitytype] = 'Emails';
 	$email->plugin_save = true;
 	$email->save("Emails");
-
 	$email->set_emails_contact_invitee_relationship($email->id,$contact_ids);
 	$email->set_emails_se_invitee_relationship($email->id,$contact_ids);
 	$email->set_emails_user_invitee_relationship($email->id,$user_id);

Modified: vtigercrm/branches/5.0.3/soap/vtigerolservice.php
==============================================================================
--- vtigercrm/branches/5.0.3/soap/vtigerolservice.php (original)
+++ vtigercrm/branches/5.0.3/soap/vtigerolservice.php Tue Dec 19 07:11:17 2006
@@ -307,12 +307,14 @@
 
 function AddMessageToContact($username,$contactid,$msgdtls)
 {
+	global $current_user;
 	global $adb;
 	require_once('modules/Users/Users.php');
 	require_once('modules/Emails/Emails.php');
 	
-	$seed_user = new Users();
-	$user_id = $seed_user->retrieve_user_id($username);
+	$current_user = new Users();
+	$user_id = $current_user->retrieve_user_id($username);
+	$current_user = $current_user->retrieveCurrentUserInfoFromFile($user_id);
 	
 	foreach($msgdtls as $msgdtl)
 	{





More information about the vtigercrm-commits mailing list