summaryrefslogtreecommitdiff
path: root/modules/system
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-07-07 00:57:44 +0000
committerDries Buytaert <dries@buytaert.net>2010-07-07 00:57:44 +0000
commit16eb932fcd8149171794a72b9e6f384eb12d2867 (patch)
tree7da4424130427b75f1dacd52259819047619cd93 /modules/system
parentc0fcf85b3901f2dde808791b5c59d0c545d8cbdc (diff)
downloadbrdo-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.php4
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')