Merge branch 'develop' into feature/server-mounts

This commit is contained in:
Matthew Penner 2020-07-04 15:20:01 -06:00 committed by GitHub
commit 29876e023b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
166 changed files with 5482 additions and 4130 deletions

View file

@ -140,7 +140,7 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor
*/
public function createUser(string $username, string $remote, string $password, $max_connections): bool
{
if (!$max_connections) {
if (! $max_connections) {
return $this->run(sprintf('CREATE USER `%s`@`%s` IDENTIFIED BY \'%s\'', $username, $remote, $password));
} else {
return $this->run(sprintf('CREATE USER `%s`@`%s` IDENTIFIED BY \'%s\' WITH MAX_USER_CONNECTIONS %s', $username, $remote, $password, $max_connections));

View file

@ -0,0 +1,16 @@
<?php
namespace Pterodactyl\Repositories\Eloquent;
use Pterodactyl\Models\RecoveryToken;
class RecoveryTokenRepository extends EloquentRepository
{
/**
* @return string
*/
public function model()
{
return RecoveryToken::class;
}
}

View file

@ -34,7 +34,7 @@ class SessionRepository extends EloquentRepository implements SessionRepositoryI
*
* @param int $user
* @param string $session
* @return null|int
* @return int|null
*/
public function deleteUserSession(int $user, string $session)
{

View file

@ -41,7 +41,7 @@ class TaskRepository extends EloquentRepository implements TaskRepositoryInterfa
*
* @param int $schedule
* @param int $index
* @return null|\Pterodactyl\Models\Task
* @return \Pterodactyl\Models\Task|null
*/
public function getNextTask(int $schedule, int $index)
{