Mercurial > defr > drupal > core
comparison modules/user/user.module @ 19:3edae6ecd6c6 6.9
Drupal 6.9
author | Franck Deroche <franck@defr.org> |
---|---|
date | Thu, 15 Jan 2009 10:15:56 +0100 |
parents | 4347c45bb494 |
children |
comparison
equal
deleted
inserted
replaced
18:f5131a9cd9e5 | 19:3edae6ecd6c6 |
---|---|
1 <?php | 1 <?php |
2 // $Id: user.module,v 1.892.2.9 2008/11/05 14:13:03 dries Exp $ | 2 // $Id: user.module,v 1.892.2.11 2009/01/14 23:34:08 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @file | 5 * @file |
6 * Enables the user registration and login system. | 6 * Enables the user registration and login system. |
7 */ | 7 */ |
268 | 268 |
269 // If the password changed, delete all open sessions and recreate | 269 // If the password changed, delete all open sessions and recreate |
270 // the current one. | 270 // the current one. |
271 if (!empty($array['pass'])) { | 271 if (!empty($array['pass'])) { |
272 sess_destroy_uid($account->uid); | 272 sess_destroy_uid($account->uid); |
273 sess_regenerate(); | 273 if ($account->uid == $GLOBALS['user']->uid) { |
274 sess_regenerate(); | |
275 } | |
274 } | 276 } |
275 | 277 |
276 // Refresh user object. | 278 // Refresh user object. |
277 $user = user_load(array('uid' => $account->uid)); | 279 $user = user_load(array('uid' => $account->uid)); |
278 | 280 |
1530 } | 1532 } |
1531 else { | 1533 else { |
1532 $form['picture']['picture_delete'] = array('#type' => 'hidden'); | 1534 $form['picture']['picture_delete'] = array('#type' => 'hidden'); |
1533 } | 1535 } |
1534 $form['picture']['picture_upload'] = array('#type' => 'file', '#title' => t('Upload picture'), '#size' => 48, '#description' => t('Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kB.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'), '%size' => variable_get('user_picture_file_size', '30'))) .' '. variable_get('user_picture_guidelines', '')); | 1536 $form['picture']['picture_upload'] = array('#type' => 'file', '#title' => t('Upload picture'), '#size' => 48, '#description' => t('Your virtual face or picture. Maximum dimensions are %dimensions and the maximum size is %size kB.', array('%dimensions' => variable_get('user_picture_dimensions', '85x85'), '%size' => variable_get('user_picture_file_size', '30'))) .' '. variable_get('user_picture_guidelines', '')); |
1537 $form['#validate'][] = 'user_profile_form_validate'; | |
1535 $form['#validate'][] = 'user_validate_picture'; | 1538 $form['#validate'][] = 'user_validate_picture'; |
1536 } | 1539 } |
1537 $form['#uid'] = $uid; | 1540 $form['#uid'] = $uid; |
1538 | 1541 |
1539 return $form; | 1542 return $form; |