aboutsummaryrefslogtreecommitdiff
path: root/mod/uservalidationbyemail/lib/functions.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-05 03:09:08 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-05 03:09:08 +0000
commitf1c75074c96f8c8f144bc132f75443dd8502c440 (patch)
tree4b625934fa5b541160e53f631ba034c023502bd3 /mod/uservalidationbyemail/lib/functions.php
parent86cdf25271e1cc516a370a91a93e62ed94c6e56f (diff)
downloadelgg-f1c75074c96f8c8f144bc132f75443dd8502c440.tar.gz
elgg-f1c75074c96f8c8f144bc132f75443dd8502c440.tar.bz2
Using more built-in API to get unvalidated users.
git-svn-id: http://code.elgg.org/elgg/trunk@7009 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/uservalidationbyemail/lib/functions.php')
-rw-r--r--mod/uservalidationbyemail/lib/functions.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/mod/uservalidationbyemail/lib/functions.php b/mod/uservalidationbyemail/lib/functions.php
index 0610c1809..4ba5d13b7 100644
--- a/mod/uservalidationbyemail/lib/functions.php
+++ b/mod/uservalidationbyemail/lib/functions.php
@@ -126,23 +126,18 @@ function uservalidationbyemail_get_user_validation_status($user_guid) {
* This doesn't include any security, so should be called ONLY be admin users!
* @return array
*/
-function uservalidationbyemail_get_unvalidated_users() {
+function uservalidationbyemail_get_unvalidated_users_sql_where() {
global $CONFIG;
$validated_id = get_metastring_id('validated');
$one_id = get_metastring_id(1);
// thanks to daveb@freenode for the SQL tips!
- $q = "SELECT e.* FROM {$CONFIG->dbprefix}entities e
- WHERE e.type = 'user'
- AND NOT EXISTS (
+ $where = "NOT EXISTS (
SELECT 1 FROM {$CONFIG->dbprefix}metadata md
WHERE md.entity_guid = e.guid
AND md.name_id = $validated_id
- AND md.value_id = $one_id)
+ AND md.value_id = $one_id)";
- ORDER BY e.guid DESC";
-
- $users = get_data($q, 'entity_row_to_elggstar');
- return $users;
+ return $where;
} \ No newline at end of file