refactor: Session.php only included once, login procedure optimization

#313
This commit is contained in:
Martin Ambrus
2017-11-20 00:39:37 +01:00
parent cb843dda57
commit 66132a7cdf
5 changed files with 36 additions and 30 deletions
+6 -6
View File
@@ -5,15 +5,15 @@ use App\Entity\User;
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ##
## Project: TravianZ ##
## Version: 22.06.2015 ##
## Version: 22.06.2015 ##
## Filename Account.php ##
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
## Fixed by: InCube - double troops ##
## License: TravianZ Project ##
## Copyright: TravianZ (c) 2010-2015. All rights reserved. ##
## URLs: http://travian.shadowss.ro ##
## Source code: https://github.com/Shadowss/TravianZ ##
## Source code: https://github.com/Shadowss/TravianZ ##
## ##
#################################################################################
@@ -29,7 +29,7 @@ for ($i = 0; $i < 5; $i++) {
}
}
include($autoprefix."GameEngine/Session.php");
include_once($autoprefix."GameEngine/Session.php");
class Account {
@@ -113,7 +113,7 @@ class Account {
$form->addError("invt",$_POST['invited']);
$_SESSION['errorarray'] = $form->getErrors();
$_SESSION['valuearray'] = $_POST;
header("Location: anmelden.php");
exit;
@@ -277,7 +277,7 @@ class Account {
$database->addTech($wid);
$database->addABTech($wid);
$database->updateUserField($uid,"access",USER,1);
$message = new Message();
$message->sendWelcome($uid,$username);
}