diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-21 07:27:00 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-07-21 07:27:00 +0000 |
commit | ef5360ab3c1a1a0a2d5246ca57a6866a4efc2175 (patch) | |
tree | c37eb5431050dd7433ca2cea671ff8a8041dfe1a | |
parent | 2da6a0ed1e32189010ff2cb9b39ecaad18250e2d (diff) | |
download | brdo-ef5360ab3c1a1a0a2d5246ca57a6866a4efc2175.tar.gz brdo-ef5360ab3c1a1a0a2d5246ca57a6866a4efc2175.tar.bz2 |
#525754 by chx: Clean up some trailing whitespace.
-rw-r--r-- | includes/database/database.inc | 4 | ||||
-rw-r--r-- | modules/system/system.install | 4 | ||||
-rw-r--r-- | modules/user/user.module | 26 |
3 files changed, 17 insertions, 17 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc index a5da925de..69f84a446 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -1348,7 +1348,7 @@ abstract class Database { // We need to pass around the simpletest database prefix in the request // and we put that in the user_agent header. - if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) { + if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/^simpletest\d+$/", $_SERVER['HTTP_USER_AGENT'])) { $db_prefix .= $_SERVER['HTTP_USER_AGENT']; } return $new_connection; @@ -2468,7 +2468,7 @@ function _db_error_page($error = '') { function db_ignore_slave() { $connection_info = Database::getConnectionInfo(); // Only set ignore_slave_server if there are slave servers - // being used, which is assumed if there are more than one. + // being used, which is assumed if there are more than one. if (count($connection_info) > 1) { // Five minutes is long enough to allow the slave to break and resume // interrupted replication without causing problems on the Drupal site diff --git a/modules/system/system.install b/modules/system/system.install index 748e7a302..38640dd7e 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -382,8 +382,8 @@ function system_install() { ->values(array('name' => 'authenticated user')) ->execute(); - // Sanity check to ensure the anonymous and authenticated role IDs are the - // same as the drupal defined constants. In certain situations, this will + // Sanity check to ensure the anonymous and authenticated role IDs are the + // same as the drupal defined constants. In certain situations, this will // not be true. if ($rid_anonymous != DRUPAL_ANONYMOUS_RID) { db_update('role') diff --git a/modules/user/user.module b/modules/user/user.module index f3d188791..5bf60ad50 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -325,11 +325,11 @@ function user_load_by_name($name) { * * @param $account * (optional) The user object to modify or add. If you want to modify - * an existing user account, you will need to ensure that (a) $account - * is an object, and (b) you have set $account->uid to the numeric + * an existing user account, you will need to ensure that (a) $account + * is an object, and (b) you have set $account->uid to the numeric * user ID of the user account you wish to modify. If you * want to create a new user account, you can set $account->is_new to - * TRUE or omit the $account->uid field. + * TRUE or omit the $account->uid field. * @param $edit * An array of fields and values to save. For example array('name' * => 'My name'). Keys that do not belong to columns in the user-related @@ -398,7 +398,6 @@ function user_save($account, $edit = array(), $category = 'account') { } } - // Process picture uploads. if (!empty($edit['picture']->fid)) { $picture = $edit['picture']; @@ -416,6 +415,7 @@ function user_save($account, $edit = array(), $category = 'account') { $edit['picture'] = empty($edit['picture']->fid) ? 0 : $edit['picture']->fid; $edit['data'] = $data; + // Do not allow 'uid' to be changed. $edit['uid'] = $account->uid; // Save changes to the user table. $success = drupal_write_record('users', $edit, 'uid'); @@ -1594,7 +1594,7 @@ function user_login(&$form_state) { * authentication fails. Distributed authentication modules are welcome * to use hook_form_alter() to change this series in order to * authenticate against their user database instead of the local users - * table. If a distributed authentication module is successful, it + * table. If a distributed authentication module is successful, it * should set $form_state['uid'] to a user ID. * * We use three validators instead of one since external authentication @@ -1622,7 +1622,7 @@ function user_login_name_validate($form, &$form_state) { /** * A validate handler on the login form. Check supplied username/password - * against local users table. If successful, $form_state['uid'] + * against local users table. If successful, $form_state['uid'] * is set to the matching user ID. */ function user_login_authenticate_validate($form, &$form_state) { @@ -1656,10 +1656,10 @@ function user_authenticate(&$form_state) { // Allow alternate password hashing schemes. require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc'); if (user_check_password($password, $account)) { - + // Successful authentication. Set a flag for user_login_final_validate(). $form_state['uid'] = $account->uid; - + // Update user to new password scheme if needed. if (user_needs_new_hash($account)) { $new_hash = user_hash_password($password); @@ -1701,15 +1701,15 @@ function user_login_finalize(&$edit = array()) { } /** - * Submit handler for the login form. Load $user object and perform standard login - * tasks. The user is then redirected to the My Account page. Setting the + * Submit handler for the login form. Load $user object and perform standard login + * tasks. The user is then redirected to the My Account page. Setting the * destination in the query string overrides the redirect. */ function user_login_submit($form, &$form_state) { global $user; $user = user_load($form_state['uid']); user_login_finalize(); - + $form_state['redirect'] = 'user/' . $user->uid; } @@ -1737,7 +1737,7 @@ function user_external_login_register($name, $module) { } user_set_authmaps($account, array("authname_$module" => $name)); } - + // Log user in. $form_state['uid'] = $account->uid; user_login_submit(array(), $form_state); @@ -2803,7 +2803,7 @@ function user_register_submit($form, &$form_state) { drupal_set_message(t('</p><p> Your password is <strong>%pass</strong>. You may change your password below.</p>', array('%pass' => $pass))); } - $form_state['values'] += $merge_data; + $form_state['values'] += $merge_data; user_authenticate(array_merge($form_state)); $form_state['redirect'] = 'user/1/edit'; |