function getDefaultAssigneeId() { global $adb; $adb->println("Entering customer portal function getPortalUserid"); // Look the value from cache first $defaultassignee = Vtiger_Soap_CustomerPortal::lookupPrefValue('defaultassignee'); if ($defaultassignee === false) { $res = $adb->pquery("SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'defaultassignee' AND tabid = 0", array()); $norows = $adb->num_rows($res); if ($norows > 0) { $defaultassignee = $adb->query_result($res, 0, 'prefvalue'); // Update the cache information now. Vtiger_Soap_CustomerPortal::updatePrefValue('defaultassignee', $defaultassignee); } } return $defaultassignee; $log->debug("Exiting customerportal function getPortalUserid"); }
function getPortalUserid() { global $adb, $log; $log->debug("Entering customer portal function getPortalUserid"); // Look the value from cache first $userid = Vtiger_Soap_CustomerPortal::lookupPrefValue('userid'); if ($userid === false) { $res = $adb->pquery("SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'userid' AND tabid = 0", array()); $norows = $adb->num_rows($res); if ($norows > 0) { $userid = $adb->query_result($res, 0, 'prefvalue'); // Update the cache information now. Vtiger_Soap_CustomerPortal::updatePrefValue('userid', $userid); } } return $userid; $log->debug("Exiting customerportal function getPortalUserid"); }