mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 13:05:50 +08:00
added followAfterReply to core
This commit is contained in:
parent
6bdebfbf3c
commit
603367a41a
|
@ -10,6 +10,7 @@
|
|||
*/
|
||||
|
||||
use Illuminate\Database\Schema\Builder;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
return [
|
||||
'up' => function (Builder $builder) {
|
||||
|
@ -22,10 +23,10 @@ return [
|
|||
->each(function ($user) use ($db) {
|
||||
collect(json_decode($user->preferences ?? '{}'))
|
||||
->each(function ($value, $key) use ($user, $db) {
|
||||
if ($key === 'discloseOnline') {
|
||||
if (in_array($key, ['discloseOnline', 'followAfterReply'])) {
|
||||
$db->table('users')
|
||||
->where('id', $user->id)
|
||||
->update(['disclose_online' => (bool) $value]);
|
||||
->update([Str::snake($key) => (bool) $value]);
|
||||
}
|
||||
if ($key === 'locale') {
|
||||
$db->table('users')
|
||||
|
|
Loading…
Reference in New Issue
Block a user