Commit 2741f24f authored by domi's avatar domi
Browse files

enum_domains() can now receive a specific uid, defaults to cuid

parent f433b0d9
......@@ -106,10 +106,11 @@ class m_mail {
/** Returns the list of mail-hosting domains for a user
* @return array indexed array of hosted domains
function enum_domains() {
function enum_domains($uid=-1) {
global $db,$err,$cuid;
$db->query("select, d.domaine, count( as nb_mail FROM domaines d left join address a on where d.compte = $cuid group by order by d.domaine asc;");
if ($uid == -1) { $uid = $cuid; }
$db->query("SELECT, d.domaine, COUNT( AS nb_mail FROM domaines d LEFT JOIN address a ON WHERE d.compte={$uid} GROUP BY ORDER BY d.domaine ASC;");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment