diff --git a/auth/db/auth.php b/auth/db/auth.php index 8f60cc32ca9..931b4d26682 100644 --- a/auth/db/auth.php +++ b/auth/db/auth.php @@ -230,11 +230,11 @@ class auth_plugin_db extends auth_plugin_base { if (count($userlist)) { list($notin_sql, $params) = $DB->get_in_or_equal($userlist, SQL_PARAMS_NAMED, 'u', false); $params['authtype'] = $this->authtype; - $sql = "SELECT u.id, u.username, u.email, u.auth + $sql = "SELECT u.* FROM {user} u WHERE u.auth=:authtype AND u.deleted=0 AND u.username $notin_sql"; } else { - $sql = "SELECT u.id, u.username, u.email, u.auth + $sql = "SELECT u.* FROM {user} u WHERE u.auth=:authtype AND u.deleted=0"; $params = array(); diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 447b6a69d7f..9f2f03c4991 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -689,7 +689,7 @@ class auth_plugin_ldap extends auth_plugin_base { // Find users in DB that aren't in ldap -- to be removed! // this is still not as scalable (but how often do we mass delete?) if ($this->config->removeuser !== AUTH_REMOVEUSER_KEEP) { - $sql = 'SELECT u.id, u.username, u.email, u.auth + $sql = 'SELECT u.* FROM {user} u LEFT JOIN {tmp_extuser} e ON (u.username = e.username AND u.mnethostid = e.mnethostid) WHERE u.auth = ? diff --git a/lib/cronlib.php b/lib/cronlib.php index 9ccfc3004bd..dc944a4228d 100644 --- a/lib/cronlib.php +++ b/lib/cronlib.php @@ -219,7 +219,7 @@ function cron_run() { if (!empty($CFG->deleteincompleteusers)) { $cuttime = $timenow - ($CFG->deleteincompleteusers * 3600); - $rs = $DB->get_recordset_sql ("SELECT id, username + $rs = $DB->get_recordset_sql ("SELECT * FROM {user} WHERE confirmed = 1 AND lastaccess > 0 AND lastaccess < ? AND deleted = 0 diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 47e5a7b3433..6cf72369e32 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -3462,7 +3462,7 @@ function truncate_userinfo($info) { * * Any plugin that needs to purge user data should register the 'user_deleted' event. * - * @param object $user User object before delete + * @param stdClass $user full user object before delete * @return boolean always true */ function delete_user($user) {