mirror of
https://github.com/flarum/core.git
synced 2025-08-11 02:44:04 +02:00
Prompt for nickname on registration (#4)
Allow users to set a nickname while registering, controlled by settings. Also, add a setting to hide the username input entirely and randomly generate the username. Co-authored-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
745de66d23
commit
3c5229610f
@@ -7,7 +7,7 @@ return [
|
||||
'up' => function(Builder $schema) {
|
||||
if (!$schema->hasColumn('users', 'nickname')) {
|
||||
$schema->table('users', function (Blueprint $table) use ($schema) {
|
||||
$table->string('nickname', 150)->after('username')->index();
|
||||
$table->string('nickname', 150)->after('username')->index()->nullable();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* For detailed copyright and license information, please view the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use Flarum\Database\Migration;
|
||||
|
||||
return Migration::addSettings([
|
||||
'flarum-nicknames.max' => '150',
|
||||
'flarum-nicknames.min' => '1',
|
||||
]);
|
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
|
||||
return [
|
||||
'up' => function (Builder $schema) {
|
||||
$schema->table('users', function (Blueprint $table) {
|
||||
$table->string('nickname')->nullable()->change();
|
||||
});
|
||||
},
|
||||
'down' => function (Builder $schema) {
|
||||
}
|
||||
];
|
Reference in New Issue
Block a user