Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'w29_MDL-28182_m20_userdel' of git://github.com/skodak/m…

…oodle into MOODLE_20_STABLE
  • Loading branch information...
commit 100308ce24e441fb7a1f2d4408d465529613a2d1 2 parents f6fc361 + 3f51ad2
@samhemelryk samhemelryk authored
View
4 auth/db/auth.php
@@ -230,11 +230,11 @@ function sync_users($do_updates=false) {
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();
View
2  auth/ldap/auth.php
@@ -689,7 +689,7 @@ function sync_users($do_updates=true) {
// 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 = ?
View
2  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
View
2  lib/moodlelib.php
@@ -3406,7 +3406,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) {
Please sign in to comment.
Something went wrong with that request. Please try again.