21
lib/functions/froxlor/function.getCustomerIdByDomain.php
Normal file
21
lib/functions/froxlor/function.getCustomerIdByDomain.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* returns the customer-id of a customer by given domain
|
||||
*
|
||||
* @param string $domain users domain
|
||||
*
|
||||
* @return int customers id
|
||||
*/
|
||||
function getCustomerIdByDomain($domain = null)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$result = $db->query_first("SELECT `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '".$domain."'");
|
||||
if(is_array($result)
|
||||
&& isset($result['customerid'])
|
||||
) {
|
||||
return $result['customerid'];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user