Page MenuHomePhorge

SuspendCommand.php
No OneTemporary

Authored By
Unknown
Size
806 B
Referenced Files
None
Subscribers
None

SuspendCommand.php

<?php
namespace App\Console\Commands\User;
use App\Console\Command;
class SuspendCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'user:suspend {user} {--comment=}';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Suspend a user';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$user = $this->getUser($this->argument('user'));
if (!$user) {
$this->error("User not found.");
return 1;
}
$user->suspend();
\App\EventLog::createFor($user, \App\EventLog::TYPE_SUSPENDED, $this->option('comment'));
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 2:05 PM (1 w, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18851688
Default Alt Text
SuspendCommand.php (806 B)

Event Timeline