mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Remove userseed from users table
This commit is contained in:
@@ -65,7 +65,6 @@ class RegisterController extends Controller
|
||||
'notes' => $data['notes'],
|
||||
'invites' => $data['defaultinvites'],
|
||||
'api_token' => md5(PasswordFacade::getRepository()->createNewToken()),
|
||||
'userseed' => md5(Str::uuid()->toString()),
|
||||
]);
|
||||
|
||||
$role = Role::query()->where('id', '=', $data['roles_id'])->first();
|
||||
|
||||
+1
-3
@@ -65,7 +65,6 @@ use Spatie\Permission\Traits\HasRoles;
|
||||
* @property string|null $nzbgetpassword
|
||||
* @property string|null $nzbvortex_api_key
|
||||
* @property string|null $nzbvortex_server_url
|
||||
* @property string $userseed
|
||||
* @property string $notes
|
||||
* @property string|null $cp_url
|
||||
* @property string|null $cp_api
|
||||
@@ -118,7 +117,6 @@ use Spatie\Permission\Traits\HasRoles;
|
||||
* @method static Builder|\App\Models\User whereUpdatedAt($value)
|
||||
* @method static Builder|\App\Models\User whereUserRolesId($value)
|
||||
* @method static Builder|\App\Models\User whereUsername($value)
|
||||
* @method static Builder|\App\Models\User whereUserseed($value)
|
||||
* @method static Builder|\App\Models\User whereXxxview($value)
|
||||
* @method static Builder|\App\Models\User whereVerified($value)
|
||||
* @method static Builder|\App\Models\User whereApiToken($value)
|
||||
@@ -484,7 +482,7 @@ class User extends Authenticatable
|
||||
|
||||
public static function updatePassword(int $id, string $password): int
|
||||
{
|
||||
self::find($id)->update(['password' => self::hashPassword($password), 'userseed' => md5(Str::uuid()->toString())]);
|
||||
self::find($id)->update(['password' => self::hashPassword($password)]);
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ class UserServiceObserver
|
||||
$user->update(
|
||||
[
|
||||
'api_token' => md5(Password::getRepository()->createNewToken()),
|
||||
'userseed' => md5(Str::uuid()->toString()),
|
||||
'rate_limit' => $rateLimit,
|
||||
]
|
||||
);
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropColumn('userseed');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('userseed')->nullable();
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -1207,7 +1207,6 @@ CREATE TABLE `users` (
|
||||
`bookview` int(11) NOT NULL DEFAULT 1,
|
||||
`gameview` int(11) NOT NULL DEFAULT 1,
|
||||
`rate_limit` int(11) NOT NULL DEFAULT 60,
|
||||
`userseed` varchar(50) NOT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`style` varchar(255) DEFAULT NULL,
|
||||
`rolechangedate` datetime DEFAULT NULL COMMENT 'When does the role expire',
|
||||
|
||||
Reference in New Issue
Block a user