Skip to content

Commit

Permalink
Renamed redefinition of $server (#203)
Browse files Browse the repository at this point in the history
* Renamed redefinition of $server to $serverGroupName in modules
  * login.php
  * create.php
  • Loading branch information
cydh committed Sep 12, 2018
1 parent 99f8feb commit a70ae78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/Flux.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ private static function registerAthenaServer($serverName, $athenaServerName, Flu
/**
* Get Flux_LoginAthenaGroup server object by its ServerName.
*
* @param string
* @param string $serverName Server group name.
* @return mixed Returns Flux_LoginAthenaGroup instance or false on failure.
* @access public
*/
Expand Down
4 changes: 2 additions & 2 deletions modules/account/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require_once 'Flux/RegisterError.php';

try {
$server = $params->get('server');
$serverGroupName = $params->get('server');
$username = $params->get('username');
$password = $params->get('password');
$confirm = $params->get('confirm_password');
Expand All @@ -24,7 +24,7 @@
$birthdate = $params->get('birthdate_date');
$code = $params->get('security_code');

if (!($server = Flux::getServerGroupByName($server))) {
if (!($server = Flux::getServerGroupByName($serverGroupName))) {
throw new Flux_RegisterError('Invalid server', Flux_RegisterError::INVALID_SERVER);
}

Expand Down
6 changes: 3 additions & 3 deletions modules/account/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
$loginLogTable = Flux::config('FluxTables.LoginLogTable');

if (count($_POST)) {
$server = $params->get('server');
$serverGroupName = $params->get('server');
$username = $params->get('username');
$password = $params->get('password');
$code = $params->get('security_code');

try {
$session->login($server, $username, $password, $code);
$session->login($serverGroupName, $username, $password, $code);
$returnURL = $params->get('return_url');

if ($session->loginAthenaGroup->loginServer->config->getUseMD5()) {
Expand All @@ -38,7 +38,7 @@
}
catch (Flux_LoginError $e) {
if ($username && $password && $e->getCode() != Flux_LoginError::INVALID_SERVER) {
$loginAthenaGroup = Flux::getServerGroupByName($server);
$loginAthenaGroup = Flux::getServerGroupByName($serverGroupName);

$sql = "SELECT account_id FROM {$loginAthenaGroup->loginDatabase}.login WHERE ";

Expand Down

0 comments on commit a70ae78

Please sign in to comment.