Skip to content

Commit a680fdd

Browse files
committed
Beutify code
1 parent b7ad6c2 commit a680fdd

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

webroot/panel/new_account.php

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@
4343
foreach ($pending_requests as $request) {
4444
if ($request["request_for"] == "admin") {
4545
// 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);
4749
$pi_group->cancelGroupRequest();
48-
}
49-
else {
50+
} else {
5051
$pi_group = new UnityGroup($request["request_for"], $LDAP, $SQL, $MAILER, $REDIS, $WEBHOOK);
5152
$pi_group->cancelGroupJoinRequest($user=$USER);
5253
}
@@ -60,24 +61,26 @@
6061
<h1>Request Account</h1>
6162
<hr>
6263

63-
<?php if (count($pending_requests) > 0): ?>
64+
<?php if (count($pending_requests) > 0) : ?>
6465
<p>You have pending account activation requests:</p>
65-
<?php foreach ($pending_requests as $request): ?>
66+
<?php foreach ($pending_requests as $request) : ?>
6667
<?php
6768
$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+
}
7680
?>
7781
<a href="?cancel=true">Cancel Request</a>
7882
<?php endforeach; ?>
79-
<?php else: ?>
80-
83+
<?php else : ?>
8184
<form id="newAccountForm" action="" method="POST">
8285
<p>Please verify that the information below is correct before continuing</p>
8386
<div>

0 commit comments

Comments
 (0)