WIP: Next major version - AthenaHR v2 #1

Draft
miguel456 wants to merge 46 commits from develop into main
792 changed files with 5552 additions and 3916 deletions
Showing only changes of commit b913a85bee - Show all commits

View File

@@ -21,6 +21,7 @@
namespace App\Http\Controllers\Auth;
use App\Facades\Options;
use App\Http\Controllers\Controller;
use App\User;
use GuzzleHttp\Exception\ClientException;
@@ -70,6 +71,14 @@ class DiscordController extends Controller
Auth::login($appUser, true);
} else {
if (!Options::getOption('enable_registrations'))
{
return redirect()
->route('home')
->with('error', __('Hey there, ' . $discordUser->getName() . '! Sign ups are currently closed so we were not able to create your account. Head over to the sign up page to request an invitation if you\'d like. Alternatively, if you already have an account here, make sure to log in with Discord with the correct account you linked beforehand.'));
}
$oAuthUser = User::create([
'uuid' => null,
'name' => $discordUser->getName(),