Commit 77afaeb7 authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Fix institution adding and user upload csvs

Bug #802313

Regression introduced in 4eb7374f



global $USER was not added to some methods that needed it

Change-Id: I31a09fe098dc44db2caff15350d9e3604b5d3802
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent 4eb7374f
......@@ -444,6 +444,8 @@ EOF;
}
function institution_validate(Pieform $form, $values) {
global $USER;
if (!empty($values['name']) && !$form->get_error('name') && record_exists('institution', 'name', $values['name'])) {
$form->set_error('name', get_string('institutionnamealreadytaken', 'admin'));
}
......
......@@ -427,7 +427,7 @@ function uploadcsv_validate(Pieform $form, $values) {
* password on next login also.
*/
function uploadcsv_submit(Pieform $form, $values) {
global $SESSION, $CSVDATA, $FORMAT, $UPDATES;
global $USER, $SESSION, $CSVDATA, $FORMAT, $UPDATES;
$formatkeylookup = array_flip($FORMAT);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment