diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-07-07 00:57:44 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-07-07 00:57:44 +0000 |
commit | 16eb932fcd8149171794a72b9e6f384eb12d2867 (patch) | |
tree | 7da4424130427b75f1dacd52259819047619cd93 /modules/system | |
parent | c0fcf85b3901f2dde808791b5c59d0c545d8cbdc (diff) | |
download | brdo-16eb932fcd8149171794a72b9e6f384eb12d2867.tar.gz brdo-16eb932fcd8149171794a72b9e6f384eb12d2867.tar.bz2 |
- Patch #846254 by kiamlaluno: example for hook_update_N() contains wrong code.
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.api.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index adbc224b9..497eb9155 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -2812,12 +2812,14 @@ function hook_update_N(&$sandbox) { // We'll -1 to disregard the uid 0... $sandbox['max'] = db_query('SELECT COUNT(DISTINCT uid) FROM {users}')->fetchField() - 1; } - db_select('users', 'u') + + $users = db_select('users', 'u') ->fields('u', array('uid', 'name')) ->condition('uid', $sandbox['current_uid'], '>') ->range(0, 3) ->orderBy('uid', 'ASC') ->execute(); + foreach ($users as $user) { $user->name .= '!'; db_update('users') |