summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Häusler <msquare@notrademark.de>2015-07-27 17:05:11 +0200
committerPhilip Häusler <msquare@notrademark.de>2015-07-27 17:05:16 +0200
commit386a3c32982f424af7ef40630a7ca0d50d660936 (patch)
tree41af154cf9ac62e8bcbeca803284467826d4c603
parent4f7f4a33f7aad7d6d3d426749b2247c3d867bdfa (diff)
remove duplication from unconfirmed angeltypes hint
-rw-r--r--includes/model/UserAngelTypes_model.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/model/UserAngelTypes_model.php b/includes/model/UserAngelTypes_model.php
index 19686480..fccabd96 100644
--- a/includes/model/UserAngelTypes_model.php
+++ b/includes/model/UserAngelTypes_model.php
@@ -19,13 +19,15 @@ function User_angeltypes($user) {
*/
function User_unconfirmed_AngelTypes($user) {
return sql_select("
- SELECT `UnconfirmedMembers`.*, `AngelTypes`.`name` FROM `UserAngelTypes`
+ SELECT `UserAngelTypes`.*, `AngelTypes`.`name` FROM `UserAngelTypes`
JOIN `AngelTypes` ON `UserAngelTypes`.`angeltype_id`=`AngelTypes`.`id`
JOIN `UserAngelTypes` as `UnconfirmedMembers` ON `UserAngelTypes`.`angeltype_id`=`UnconfirmedMembers`.`angeltype_id`
WHERE `UserAngelTypes`.`user_id`='" . sql_escape($user['UID']) . "'
AND `UserAngelTypes`.`coordinator`=TRUE
AND `AngelTypes`.`restricted`=TRUE
- AND `UnconfirmedMembers`.`confirm_user_id` IS NULL");
+ AND `UnconfirmedMembers`.`confirm_user_id` IS NULL
+ GROUP BY `UserAngelTypes`.`user_id`
+ ORDER BY `AngelTypes`.`name`");
}
/**