Drupal: Added login link for anonymous users, they are directed to login when trying to create a new team.

https://dev.gridrepublic.org/browse/DBOINCP-258
This commit is contained in:
Shawn Kwang 2016-08-18 15:32:49 -05:00
parent 76b9062ae6
commit b1057a12e5
1 changed files with 3 additions and 2 deletions

View File

@ -796,8 +796,9 @@ function boincteam_create_team_link_panel() {
$output .= ' <li class="first last tab">';
if (isset($account->roles[$unrestricted_role])) {
$output .= l(bts('Create new team'), 'community/teams/add');
}
else {
} elseif ($account->uid <= 0) {
$output .= l(bts('Login to create a new team'), 'user/login');
} else {
$min_credit_needed = variable_get('boinc_comment_min_credit', 0);
$credit_needed = $min_credit_needed - $account->boincuser_total_credit;
$output .= '[';