|
43 | 43 | foreach ($pending_requests as $request) { |
44 | 44 | if ($request["request_for"] == "admin") { |
45 | 45 | // cancel PI request |
46 | | - $pi_group = new UnityGroup(UnityGroup::getPIUIDfromUID($USER->getUID()), $LDAP, $SQL, $MAILER, $REDIS, $WEBHOOK); |
| 46 | + $pi_group = new UnityGroup(UnityGroup::getPIUIDfromUID( |
| 47 | + $USER->getUID() |
| 48 | + ), $LDAP, $SQL, $MAILER, $REDIS, $WEBHOOK); |
47 | 49 | $pi_group->cancelGroupRequest(); |
48 | | - } |
49 | | - else { |
| 50 | + } else { |
50 | 51 | $pi_group = new UnityGroup($request["request_for"], $LDAP, $SQL, $MAILER, $REDIS, $WEBHOOK); |
51 | 52 | $pi_group->cancelGroupJoinRequest($user=$USER); |
52 | 53 | } |
|
60 | 61 | <h1>Request Account</h1> |
61 | 62 | <hr> |
62 | 63 |
|
63 | | -<?php if (count($pending_requests) > 0): ?> |
| 64 | +<?php if (count($pending_requests) > 0) : ?> |
64 | 65 | <p>You have pending account activation requests:</p> |
65 | | - <?php foreach ($pending_requests as $request): ?> |
| 66 | + <?php foreach ($pending_requests as $request) : ?> |
66 | 67 | <?php |
67 | 68 | $pi_uid = $request["request_for"]; |
68 | | - if ($pi_uid == "admin") { |
69 | | - echo "<p>Requesting a PI account</p>"; |
70 | | - echo "<p>You will receive an email when your account has been approved.</p><p>Email <a href=\"mailto:{$CONFIG['mail']['support']}\">{$CONFIG['mail']['support_name']}</a> if you have not heard back in one business day. </p>"; |
71 | | - } else { |
72 | | - $owner_uid = UnityGroup::getUIDfromPIUID($pi_uid); |
73 | | - echo "<p>Joining existing group owned by " . $owner_uid . "</p>"; |
74 | | - echo "<p>You will receive an email when your account has been approved by the PI. You may need to remind them.</p>"; |
75 | | - } |
| 69 | + if ($pi_uid == "admin") { |
| 70 | + echo "<p>Requesting a PI account</p>"; |
| 71 | + echo "<p>You will receive an email when your account has been approved.</p>"; |
| 72 | + echo "<p>Email <a href=\"mailto:{$CONFIG['mail']['support']}\">{$CONFIG['mail']['support_name']}</a>"; |
| 73 | + echo "if you have not heard back in one business day. </p>"; |
| 74 | + } else { |
| 75 | + $owner_uid = UnityGroup::getUIDfromPIUID($pi_uid); |
| 76 | + echo "<p>Joining existing group owned by " . $owner_uid . "</p>"; |
| 77 | + echo "<p>You will receive an email when your account has been approved by the PI."; |
| 78 | + echo "You may need to remind them.</p>"; |
| 79 | + } |
76 | 80 | ?> |
77 | 81 | <a href="?cancel=true">Cancel Request</a> |
78 | 82 | <?php endforeach; ?> |
79 | | -<?php else: ?> |
80 | | - |
| 83 | +<?php else : ?> |
81 | 84 | <form id="newAccountForm" action="" method="POST"> |
82 | 85 | <p>Please verify that the information below is correct before continuing</p> |
83 | 86 | <div> |
|
0 commit comments