aboutsummaryrefslogtreecommitdiff
path: root/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs')
-rw-r--r--plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs b/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs
index 73ea51f..bd191a1 100644
--- a/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs
+++ b/plugins/VNLib.Plugins.Essentials.Accounts/src/AccountsEntryPoint.cs
@@ -131,21 +131,19 @@ namespace VNLib.Plugins.Essentials.Accounts
string? username = args.GetArgument("-u");
string? password = args.GetArgument("-p");
- if (args.Count < 3)
+ if (args.Count < 1)
{
Log.Warn("Not enough arguments, use the help command to view available commands");
return;
}
- switch (args[2].ToLower(null))
+ switch (args[0].ToLower(null))
{
case "help":
const string help = @"
Command help for {name}
-Usage: p {name} <command> [options]
-
Commands:
create -u <username> -p <password> Create a new user
reset-password -u <username> -p <password> -l <priv level> Reset a user's password
@@ -390,9 +388,9 @@ Commands:
{
Log.Error("User already exists");
}
- catch(UserCreationFailedException)
+ catch(UserCreationFailedException ucfe)
{
- Log.Error("Failed to create the new user");
+ Log.Error(ucfe, "Failed to create the new user");
}
catch (ArgumentOutOfRangeException)
{