Merge branch 'develop' of https://voight001.lesidc.com/crm into develop

This commit is contained in:
Vincent BRIDIER 2021-06-23 10:16:35 +02:00
commit 543f0372b7

View file

@ -251,6 +251,34 @@ class WPCrm extends ApiV1
}
}
/**
* Get a customer from table
*
* @param int $crm_id The customer crm id
*
* @return object|null
*/
public static function getUserFromTable($crm_id)
{
return self::_getWpDB()->get_row(
'SELECT * FROM `ldc_wp_customers` WHERE `crm_id` = ' . $crm_id
);
}
/**
* Get a customer from table by an email
*
* @param int $email The customer email
*
* @return object|null
*/
public static function getUserFromTableByEmail($email)
{
return self::_getWpDB()->get_row(
'SELECT * FROM `ldc_wp_customers` WHERE `email` = "' . $email . '"'
);
}
/**
* Get a customer from table
*