Fix for creating users - active wasnt included. Also make admin default to FALSE

This commit is contained in:
Deon George 2021-12-18 10:30:06 +11:00
parent 0414760cf0
commit 0edfa512c7
3 changed files with 3 additions and 2 deletions

View File

@ -102,6 +102,7 @@ abstract class Base
if (! $o->exists) {
$o->team_id = $this->enterprise_id ? NULL : $this->team()->id;
$o->enterprise_id = ($x=$this->enterprise())->exists ? $x->id : NULL;
$o->active = TRUE;
$o->save();
Log::debug(sprintf('%s: User Created in DB [%s] (%s)',self::LOGKEY,$this->user_id,$o->id));

View File

@ -4,9 +4,9 @@ namespace Slack\Listeners;
use Illuminate\Support\Facades\Log;
use Illuminate\Contracts\Queue\ShouldQueue;
use Slack\Event\AppHomeOpened;
use App\Jobs\SlackHomeTabUpdate;
use Slack\Event\AppHomeOpened;
class AppHomeOpenedListener implements ShouldQueue
{

View File

@ -29,7 +29,7 @@ class SlackIntegration extends Migration
$table->string('user_id', 45)->unique();
$table->string('name')->nullable();
$table->boolean('active');
$table->boolean('admin');
$table->boolean('admin')->default(FALSE);
$table->integer('enterprise_id')->nullable()->unsigned();
$table->foreign('enterprise_id')->references('id')->on('slack_enterprises');