Skip to content

Commit

Permalink
GH-139 Use user account activation function in display code as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mdziekon committed Dec 20, 2020
1 parent cf4ee56 commit ecb0b14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion admin/user_info.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@
$Data['ally_name'] = $Data['ally_request_name'];
}
$Player['Ally'] = ($Data['ally_id'] > 0 ? '<a class="help" title="'.$_Lang['SearchByAlly'].'" href="userlist.php?search_user='.$Data['ally_id'].'&search_by=aid">'.$Data['ally_name'].' ('.$Data['ally_id'].')</a>'.($Data['ally_request'] != 0 ? ' ['.$_Lang['Request'].']' : ($Data['ally_owner'] == $UID ? ' ['.$_Lang['Ally_owner'].']' : '')) : '&nbsp;-&nbsp;');
$Player['AccountActive'] = (!empty($Data['activation_code']) ? "<b class=\"orange\">{$_Lang['_no']}</b><br/>{$_Lang['ActivationCode']}: {$Data['activation_code']}" : "<b class=\"lime\">{$_Lang['_yes']}</b>");
$Player['AccountActive'] = (
!isUserAccountActivated($Data) ?
"<b class=\"orange\">{$_Lang['_no']}</b><br/>{$_Lang['ActivationCode']}: {$Data['activation_code']}" :
"<b class=\"lime\">{$_Lang['_yes']}</b>"
);
$Player['DisableIPCheck'] = (($Data['noipcheck'] == 1) ? $_Lang['_no'] : $_Lang['_yes']);
$Player['MotherPlanet'] = "{$Data['mothername']} ({$_Lang['MotherPlanet_ID']}: {$Data['id_planet']}) [<a class=\"help\" title=\"{$_Lang['GoToGalaxy']}\" href=\"../galaxy.php?mode=3&amp;galaxy={$Data['galaxy']}&amp;system={$Data['system']}&amp;planet={$Data['planet']}\">{$Data['galaxy']}:{$Data['system']}:{$Data['planet']}</a>]";

Expand Down
3 changes: 1 addition & 2 deletions admin/userlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,7 @@
$Bloc['UserMoreInfo'] .= "<br/><span class=\"fl\"><b class=\"red\">{$_Lang['UserIsBanned']}:</b> <b class=\"{$BanColor}\">".date('d.m.Y, H:i:s', $Data['ban_endtime'])."</b></span><span class=\"fr\">({$BanTime})</span>";
}
// MoreInfo - Activation Link
if(!empty($Data['activation_code']))
{
if (!isUserAccountActivated($Data)) {
$Bloc['UserMoreInfo'] .= "<br/><span class=\"fl\"><b class=\"orange\">{$_Lang['UserNotActivated']}</b></span><span class=\"fr\">[{$_Lang['UserActivationLink']}: <a href=\"".(GAMEURL)."activate.php?code={$Data['activation_code']}\" target=\"_blank\">".(GAMEURL)."activate.php?code=<b class=\"orange\">{$Data['activation_code']}</b></a>]</span>";
}
// MoreInfo - is On Deletion
Expand Down
2 changes: 1 addition & 1 deletion includes/functions/GalaxyRowUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function GalaxyRowUser($GalaxyRowPlanet, $GalaxyRowUser, $MyBuddies, $SFBStatus)
$NameClasses[] = array('class' => 'red', 'importance' => 100);
}
}
else if(!empty($GalaxyRowUser['activation_code']))
else if(!isUserAccountActivated($GalaxyRowUser))
{
$Status[] = array('class' => 'nonactivated', 'sign' => $_Lang['User_NonActivated']);
$NameClasses[] = array('class' => 'nonactivated', 'importance' => 50);
Expand Down
3 changes: 1 addition & 2 deletions overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,7 @@
}

// --- Activation Box
if(!empty($_User['activation_code']))
{
if (!isUserAccountActivated($_User)) {
$parse['ActivationInfoBox'] = '<tr><th class="c pad5 orange" colspan="3">'.$_Lang['ActivationInfo_Text'].'</th></tr><tr><th style="visibility: hidden;">&nbsp;</th></tr>';
}

Expand Down

0 comments on commit ecb0b14

Please sign in to comment.