Browse Source

Only show invitee's email if moderator

ElectraHeart 7 years ago
parent
commit
cf628bfcf2
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      sections/user/invite.php

+ 5
- 0
sections/user/invite.php View File

@@ -216,7 +216,9 @@ if (!empty($Pending)) {
216 216
 		<table width="100%">
217 217
 			<tr class="colhead">
218 218
 				<td><a href="user.php?action=invite&amp;order=username&amp;sort=<?=(($CurrentOrder == 'username') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>">Username</a></td>
219
+<? if (check_perms('users_mod')) { ?>
219 220
 				<td><a href="user.php?action=invite&amp;order=email&amp;sort=<?=(($CurrentOrder == 'email') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>">Email</a></td>
221
+<? } ?>
220 222
 				<td><a href="user.php?action=invite&amp;order=joined&amp;sort=<?=(($CurrentOrder == 'joined') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>">Joined</a></td>
221 223
 				<td><a href="user.php?action=invite&amp;order=lastseen&amp;sort=<?=(($CurrentOrder == 'lastseen') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>">Last Seen</a></td>
222 224
 				<td><a href="user.php?action=invite&amp;order=uploaded&amp;sort=<?=(($CurrentOrder == 'uploaded') ? $NewSort : 'desc')?>&amp;<?=$CurrentURL ?>">Uploaded</a></td>
@@ -227,11 +229,14 @@ if (!empty($Pending)) {
227 229
 	$Row = 'a';
228 230
 	foreach ($Invited as $User) {
229 231
 		list($ID, $Email, $Uploaded, $Downloaded, $JoinDate, $LastAccess) = $User;
232
+		$Email = apcu_exists('DBKEY') ? Crypto::decrypt($Email) : '[Encrypted]';
230 233
 		$Row = $Row === 'a' ? 'b' : 'a';
231 234
 ?>
232 235
 			<tr class="row<?=$Row?>">
233 236
 				<td><?=Users::format_username($ID, true, true, true, true)?></td>
237
+<? if (check_perms('users_mod')) { ?>
234 238
 				<td><?=display_str($Email)?></td>
239
+<? } ?>
235 240
 				<td><?=time_diff($JoinDate, 1)?></td>
236 241
 				<td><?=time_diff($LastAccess, 1);?></td>
237 242
 				<td><?=Format::get_size($Uploaded)?></td>

Loading…
Cancel
Save