debug the connections - no disconnect threatment and graphics design
This commit is contained in:
@@ -231,7 +231,7 @@ class MineseekerTopic implements TopicInterface
|
||||
/** This checks it is a reconnection */
|
||||
if (($one && ($red + $blue === 0)) || ($two && ($red + $blue === 1))) {
|
||||
/** @var $users {array} w/ save users to database */
|
||||
$users = $this->saveUserToDb($topic, $userName, $user, $topic->count());
|
||||
$users = $this->saveUserToDb($playedGame, $userName, $user, $topic->count());
|
||||
}
|
||||
|
||||
return $users;
|
||||
@@ -240,20 +240,15 @@ class MineseekerTopic implements TopicInterface
|
||||
/**
|
||||
* Save user data to database
|
||||
*
|
||||
* @param $topic
|
||||
* @param $playedGame
|
||||
* @param $userName
|
||||
* @param $user
|
||||
* @param $count
|
||||
* @return array
|
||||
*/
|
||||
private function saveUserToDb($topic, $userName, $user, $count)
|
||||
private function saveUserToDb($playedGame, $userName, $user, $count)
|
||||
{
|
||||
$this->reConnect();
|
||||
$gameAssoc = explode('/', $topic->getId())[2];
|
||||
|
||||
$playedGame = $this->em
|
||||
->getRepository('MineSeekerBundle:PlayedGame')
|
||||
->findOneByGameAssoc($gameAssoc);
|
||||
|
||||
/** the user is not anonym */
|
||||
if (!is_string($user)) {
|
||||
|
||||
Reference in New Issue
Block a user