Ejemplo n.º 1
0
 function generateSessionKey()
 {
     global $SQL;
     while (true) {
         $sessionKey = Website::newSessionKey();
         $result = $SQL->query('SELECT `id` FROM `accounts` WHERE `authToken` LIKE "' . $sessionKey . '"')->fetch();
         if (empty($result)) {
             break;
         }
     }
     return $sessionKey;
 }