Skip to content
Permalink
Browse files

wired the contact/user lookups to always default to user_email

  • Loading branch information...
caseysoftware committed Aug 16, 2014
1 parent 37fbaaa commit 421421d725e5e78a3b714fe23b15ea4d03aa35de
Showing with 2 additions and 5 deletions.
  1. +1 −3 classes/w2p/Core/CAppUI.class.php
  2. +1 −1 modules/tasks/tasks.class.php
  3. +0 −1 modules/users/users.class.php
@@ -799,7 +799,7 @@ public function login($username, $password)
$q = new w2p_Database_Query;
$q->addTable('users');
$q->addQuery('user_id, contact_first_name as user_first_name, ' .
$q->addQuery('user_id, contact_first_name as user_first_name, user_email, ' .
'contact_last_name as user_last_name, contact_display_name as user_display_name, ' .
'contact_company as user_company, contact_department as user_department, user_type');
$q->addJoin('contacts', 'con', 'con.contact_id = user_contact', 'inner');
@@ -823,8 +823,6 @@ public function login($username, $password)
$q->leftJoin('contacts_methods', 'cm', 'cm.contact_id = con.contact_id');
$q->addWhere("cm.method_name = 'email_primary'");
$q->addQuery('cm.method_value AS user_email');
} else {
$q->addQuery('contact_email AS user_email');
}
/* End Hack */
@@ -1634,7 +1634,7 @@ public function assignees($taskId)
$q->leftJoin('contacts', 'co', ' co.contact_id = u.user_contact');
$q->addQuery('u.*, ut.perc_assignment, ut.user_task_priority, contact_display_name,
co.contact_last_name, co.contact_first_name, contact_display_name as contact_name');
$q->addQuery('co.contact_email AS user_email, co.contact_phone AS user_phone');
$q->addQuery('co.contact_phone AS user_phone');
$q->addWhere('ut.task_id = ' . (int) $taskId);
@@ -193,7 +193,6 @@ public function loadFull($userId)
$q = $this->_getQuery();
$q->addTable('users', 'u');
$q->addQuery('u.*');
$q->addQuery('con.contact_email AS user_email');
$q->addQuery('uf.feed_token');
$q->addQuery('con.*, company_id, company_name, dept_name, dept_id');
$q->addJoin('contacts', 'con', 'user_contact = contact_id', 'inner');

0 comments on commit 421421d

Please sign in to comment.
You can’t perform that action at this time.