function merci_staff_load_user in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2
Same name and namespace in other branches
- 7.2 modules/merci_staff/merci_staff.module \merci_staff_load_user()
@todo Please document this function.
See also
3 calls to merci_staff_load_user()
- merci_staff_field_widget_form_alter in modules/
merci_staff/ merci_staff.module - merci_staff_form_alter in modules/
merci_staff/ merci_staff.module - merci_staff_reservation_node_validate in modules/
merci_staff/ merci_staff.module - @todo Please document this function.
File
- modules/
merci_staff/ merci_staff.module, line 32 - merci_staff functions
Code
function merci_staff_load_user($post = NULL) {
static $admin_user;
global $user;
if (empty($admin_user)) {
$admin_user = $user;
}
if ($post and empty($post['override']) and $newuser = user_load_by_name($post['name'])) {
$user = $newuser;
}
else {
$user = $admin_user;
}
}