Commit 377b4a1d authored by Robert Lyon's avatar Robert Lyon

Making check for admin more reliable (Bug #1300741)

Rather than relying on id number we rely on the fact they are an admin.

Change-Id: I17f87a7b0cb4e75b5392b196a84afb4105ab3668
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent c8acf2c6
......@@ -1000,7 +1000,7 @@ function requiredfields_submit(Pieform $form, $values) {
if ($field == 'email') {
$email = $values['email'];
// Need to update the admin email on installation
if ($USER->get('id') == '1') {
if ($USER->get('admin')) {
$oldemail = get_field('usr', 'email', 'id', $USER->get('id'));
if ($oldemail == '') {
// we are dealing with the dummy email that is set on install
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