Drupal: Update "create team" login link to return to teams page

https://dev.gridrepublic.org/browse/DBOINCP-257
This commit is contained in:
Tristan Olive 2016-08-19 12:40:32 -04:00
parent f1637f4f1c
commit 2bf15df97b
1 changed files with 5 additions and 1 deletions

View File

@ -797,7 +797,11 @@ function boincteam_create_team_link_panel() {
if (isset($account->roles[$unrestricted_role])) { if (isset($account->roles[$unrestricted_role])) {
$output .= l(bts('Create new team'), 'community/teams/add'); $output .= l(bts('Create new team'), 'community/teams/add');
} elseif ($account->uid <= 0) { } elseif ($account->uid <= 0) {
$output .= l(bts('Login to create a new team'), 'user/login'); $output .= l(
bts('Login to create a new team'),
'user/login',
array('query' => drupal_get_destination())
);
} else { } else {
$min_credit_needed = variable_get('boinc_comment_min_credit', 0); $min_credit_needed = variable_get('boinc_comment_min_credit', 0);
$credit_needed = $min_credit_needed - $account->boincuser_total_credit; $credit_needed = $min_credit_needed - $account->boincuser_total_credit;