diff --git a/src/Orchard.Web/Modules/Orchard.Users/Commands/UserCommands.cs b/src/Orchard.Web/Modules/Orchard.Users/Commands/UserCommands.cs index 3922251c3..c09e5d36e 100644 --- a/src/Orchard.Web/Modules/Orchard.Users/Commands/UserCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.Users/Commands/UserCommands.cs @@ -30,6 +30,11 @@ namespace Orchard.Users.Commands { [CommandHelp("user create /UserName: /Password: /Email:\r\n\t" + "Creates a new User")] [OrchardSwitches("UserName,Password,Email")] public void Create() { + if (string.IsNullOrWhiteSpace(UserName)) { + Context.Output.WriteLine(T("Username cannot be empty.")); + return; + } + if (!_userService.VerifyUserUnicity(UserName, Email)) { Context.Output.WriteLine(T("User with that username and/or email already exists.")); return;