]> git.mjollnir.org Git - moodle.git/commitdiff
Moving 3 functions from datalib to deprecatedlib. Only used
authorstronk7 <stronk7>
Wed, 3 Oct 2007 16:31:20 +0000 (16:31 +0000)
committerstronk7 <stronk7>
Wed, 3 Oct 2007 16:31:20 +0000 (16:31 +0000)
by admin/cron.php. First step of MDL-11571 and MDL-11487

lib/datalib.php
lib/deprecatedlib.php

index bb009ca8fa4e7a03dbb79c4273600dd082f12ecd..2d6c011046f9fcd3deb7c1392efcd3faeb5df632 100644 (file)
@@ -329,56 +329,6 @@ function get_users_confirmed() {
 }
 
 
-/**
- * Full list of users that have not yet confirmed their accounts.
- *
- * @uses $CFG
- * @param string $cutofftime ?
- * @return object  {@link $USER} records
- */
-function get_users_unconfirmed($cutofftime=2000000000) {
-    global $CFG;
-    return get_records_sql("SELECT *
-                             FROM {$CFG->prefix}user
-                            WHERE confirmed = 0
-                              AND firstaccess > 0
-                              AND firstaccess < $cutofftime");
-}
-
-/**
- * All users that we have not seen for a really long time (ie dead accounts)
- *
- * @uses $CFG
- * @param string $cutofftime ?
- * @return object  {@link $USER} records
- */
-function get_users_longtimenosee($cutofftime) {
-    global $CFG;
-    return get_records_sql("SELECT id, userid, courseid
-                              FROM {$CFG->prefix}user_lastaccess
-                             WHERE courseid != ".SITEID."
-                               AND timeaccess < $cutofftime ");
-}
-
-/**
- * Full list of bogus accounts that are probably not ever going to be used
- *
- * @uses $CFG
- * @param string $cutofftime ?
- * @return object  {@link $USER} records
- */
-
-function get_users_not_fully_set_up($cutofftime=2000000000) {
-    global $CFG;
-    return get_records_sql("SELECT *
-                             FROM {$CFG->prefix}user
-                            WHERE confirmed = 1
-                             AND lastaccess > 0
-                             AND lastaccess < $cutofftime
-                             AND deleted = 0
-                             AND (lastname = '' OR firstname = '' OR email = '')");
-}
-
 /// OTHER SITE AND COURSE FUNCTIONS /////////////////////////////////////////////
 
 
index 8ce1ac2fff3af4496c85d0ec4b2dcab4f6933bb9..75f7087e23e4d6315b2fbf105e13ba39a3ecf49a 100644 (file)
@@ -1471,4 +1471,59 @@ function print_group_menu($groups, $groupmode, $currentgroup, $urlroot, $showall
 
 }
 
+/**
+ * All users that we have not seen for a really long time (ie dead accounts)
+ * TODO: Delete this for Moodle 2.0
+ *
+ * @uses $CFG
+ * @deprecated The query is executed directly within admin/cron.php (MDL-11571)
+ * @param string $cutofftime ?
+ * @return object  {@link $USER} records
+ */
+function get_users_longtimenosee($cutofftime) {
+    global $CFG;
+    return get_records_sql("SELECT id, userid, courseid
+                             FROM {$CFG->prefix}user_lastaccess
+                            WHERE courseid != ".SITEID."
+                              AND timeaccess < $cutofftime ");
+}
+
+/**
+ * Full list of users that have not yet confirmed their accounts.
+ * TODO: Delete this for Moodle 2.0
+ *
+ * @uses $CFG
+ * @deprecated The query is executed directly within admin/cron.php (MDL-11487)
+ * @param string $cutofftime ?
+ * @return object  {@link $USER} records
+ */
+function get_users_unconfirmed($cutofftime=2000000000) {
+    global $CFG;
+    return get_records_sql("SELECT *
+                              FROM {$CFG->prefix}user
+                             WHERE confirmed = 0
+                               AND firstaccess > 0
+                               AND firstaccess < $cutofftime");
+}
+
+/**
+ * Full list of bogus accounts that are probably not ever going to be used
+ * TODO: Delete this for Moodle 2.0
+ *
+ * @uses $CFG
+ * @deprecated The query is executed directly within admin/cron.php (MDL-11487)
+ * @param string $cutofftime ?
+ * @return object  {@link $USER} records
+ */
+function get_users_not_fully_set_up($cutofftime=2000000000) {
+    global $CFG;
+    return get_records_sql("SELECT *
+                              FROM {$CFG->prefix}user
+                             WHERE confirmed = 1
+                               AND lastaccess > 0
+                               AND lastaccess < $cutofftime
+                               AND deleted = 0
+                               AND (lastname = '' OR firstname = '' OR email = '')");
+}
+
 ?>