Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117922064
D1582.1775433937.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D1582.1775433937.diff
View Options
diff --git a/src/app/Console/Commands/UserAddAlias.php b/src/app/Console/Commands/UserAddAlias.php
--- a/src/app/Console/Commands/UserAddAlias.php
+++ b/src/app/Console/Commands/UserAddAlias.php
@@ -12,14 +12,14 @@
*
* @var string
*/
- protected $signature = 'user:add-alias {user} {alias}';
+ protected $signature = 'user:add-alias {--force} {user} {alias}';
/**
* The console command description.
*
* @var string
*/
- protected $description = 'Add an email alias to a user';
+ protected $description = 'Add an email alias to a user (forcefully)';
/**
* Create a new command instance.
@@ -58,8 +58,10 @@
$error = UsersController::validateEmail($alias, $controller, true);
if ($error) {
- $this->error($error);
- return 1;
+ if (!$this->option('force')) {
+ $this->error($error);
+ return 1;
+ }
}
$user->aliases()->create(['alias' => $alias]);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 12:05 AM (1 d, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18822836
Default Alt Text
D1582.1775433937.diff (1 KB)
Attached To
Mode
D1582: Allow an alias to be added forcefully
Attached
Detach File
Event Timeline