Skip to content
Snippets Groups Projects
Commit 4f8a243a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

All UEDIT sysop command to pull up deleted users by alias or number

Requires the latest v3.20a for sytem.matchuserdata() to support deleted and
inactive user record searching.

This is part of the fix for the issue described in issue #513 where the
UEDIT sysop command was falling back (displaying/editing) user #1 because
the sysop-specified user number or alias was not an active user account.

The fallback to display/editing user #1 still happens, but first we try
really hard to find the user that the sysop specified as an argument to
the UEDIT command.
parent 8635b510
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -379,10 +379,15 @@ function str_cmds(str) ...@@ -379,10 +379,15 @@ function str_cmds(str)
} }
if(word=="UEDIT") { if(word=="UEDIT") {
// Prompts for syspass // Prompts for syspass
str=str.substr(5); str=str.substr(5).trim();
if(str.length) if(str.length) {
bbs.edit_user(bbs.finduser(get_arg(str, "User Alias"))); var usernum = parseInt(str, 10);
else if(isNaN(usernum) || usernum < 1 || usernum > system.lastuser)
usernum = bbs.finduser(str);
if(usernum < 1)
usernum = system.matchuserdata(U_ALIAS, str, /* deleted users? */true);
bbs.edit_user(usernum);
} else
bbs.edit_user(); bbs.edit_user();
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment