| 1 |
<?php |
<?php |
| 2 |
// $Id: user.module,v 1.892.2.17 2009/09/14 11:56:15 goba Exp $ |
// $Id: user.module,v 1.892.2.18 2009/09/16 17:54:19 goba Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 1117 |
return $items; |
return $items; |
| 1118 |
} |
} |
| 1119 |
|
|
| 1120 |
|
/** |
| 1121 |
|
* Implementation of hook_init(). |
| 1122 |
|
*/ |
| 1123 |
function user_init() { |
function user_init() { |
| 1124 |
drupal_add_css(drupal_get_path('module', 'user') .'/user.css', 'module'); |
drupal_add_css(drupal_get_path('module', 'user') .'/user.css', 'module'); |
| 1125 |
} |
} |
| 1126 |
|
|
| 1127 |
function user_uid_optional_load($arg) { |
/** |
| 1128 |
return user_load(isset($arg) ? $arg : $GLOBALS['user']->uid); |
* Load either a specified or the current user account. |
| 1129 |
|
* |
| 1130 |
|
* @param $uid |
| 1131 |
|
* An optional user ID of the user to load. If not provided, the current |
| 1132 |
|
* user's ID will be used. |
| 1133 |
|
* @return |
| 1134 |
|
* A fully-loaded $user object upon successful user load, FALSE if user |
| 1135 |
|
* cannot be loaded. |
| 1136 |
|
* |
| 1137 |
|
* @see user_load() |
| 1138 |
|
*/ |
| 1139 |
|
function user_uid_optional_load($uid = NULL) { |
| 1140 |
|
if (!isset($uid)) { |
| 1141 |
|
$uid = $GLOBALS['user']->uid; |
| 1142 |
|
} |
| 1143 |
|
return user_load($uid); |
| 1144 |
} |
} |
| 1145 |
|
|
| 1146 |
/** |
/** |