From 58b6f3292efe2c13b79d4f807f19b7d0ddd668d7 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Wed, 29 Apr 2020 22:18:34 +0100 Subject: [PATCH] Make optional application-related registration parameters optional --- app/Http/Controllers/Auth/RegisterController.php | 1 + app/User.php | 2 +- database/migrations/2014_10_12_000000_create_users_table.php | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 720b9e8..714a632 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -68,6 +68,7 @@ class RegisterController extends Controller 'name' => $data['name'], 'email' => $data['email'], 'password' => Hash::make($data['password']), + 'originalIP' => request()->ip() ]); } } diff --git a/app/User.php b/app/User.php index e79dab7..c45acbc 100644 --- a/app/User.php +++ b/app/User.php @@ -16,7 +16,7 @@ class User extends Authenticatable * @var array */ protected $fillable = [ - 'name', 'email', 'password', + 'name', 'email', 'password', 'originalIP', 'username', 'uuid', 'dob' ]; /** diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index d5fd120..5682569 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -19,8 +19,8 @@ class CreateUsersTable extends Migration $table->string('name'); $table->string('email')->unique(); $table->timestamp('email_verified_at')->nullable(); - $table->string('username'); // Mojang Username - $table->date('dob'); + $table->string('username')->nullable(); // Mojang Username + $table->date('dob')->nullable(); $table->ipAddress('originalIP'); $table->string('password'); $table->rememberToken();