You've already forked Atomcms-edit
Initial commit
This commit is contained in:
Executable
+35
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
|
||||
require __DIR__ . '/vendor/autoload.php';
|
||||
$app = require __DIR__ . '/bootstrap/app.php';
|
||||
$kernel = $app->make(Kernel::class);
|
||||
$kernel->bootstrap();
|
||||
|
||||
try {
|
||||
$user = User::create([
|
||||
'username' => 'testreg123',
|
||||
'mail' => 'testreg123@test.nl',
|
||||
'password' => bcrypt('test123'),
|
||||
'account_created' => time(),
|
||||
'last_login' => time(),
|
||||
'motto' => 'Test registration',
|
||||
'look' => 'hr-100-61.hd-180-1.ch-210-66',
|
||||
'auth_ticket' => '',
|
||||
'home_room' => 0,
|
||||
'ip_register' => '127.0.0.1',
|
||||
'ip_current' => '127.0.0.1',
|
||||
]);
|
||||
|
||||
echo 'SUCCESS! User created with ID: ' . $user->id . "\n";
|
||||
echo 'ip_register: ' . $user->ip_register . "\n";
|
||||
echo 'ip_current: ' . $user->ip_current . "\n";
|
||||
|
||||
$user->delete();
|
||||
echo "Test user deleted. All good!\n";
|
||||
} catch (Exception $e) {
|
||||
echo 'ERROR: ' . $e->getMessage() . "\n";
|
||||
echo 'File: ' . $e->getFile() . ' line ' . $e->getLine() . "\n";
|
||||
}
|
||||
Reference in New Issue
Block a user