mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
f07741e631
Remove leftover of debug code. CORE-18276
37 lines
1,019 B
C
37 lines
1,019 B
C
/*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS User Manager Control Panel
|
|
* FILE: dll/cpl/usrmgr/misc.c
|
|
* PURPOSE: Miscellaneous functions
|
|
*
|
|
* PROGRAMMERS: Eric Kohl
|
|
*/
|
|
|
|
#include "usrmgr.h"
|
|
|
|
BOOL
|
|
CheckAccountName(HWND hwndDlg,
|
|
INT nIdDlgItem,
|
|
LPTSTR lpAccountName)
|
|
{
|
|
TCHAR szAccountName[256];
|
|
UINT uLen;
|
|
|
|
if (lpAccountName)
|
|
uLen = _tcslen(lpAccountName);
|
|
else
|
|
uLen = GetDlgItemText(hwndDlg, nIdDlgItem, szAccountName, 256);
|
|
|
|
/* Check the account name */
|
|
if (uLen > 0 &&
|
|
_tcspbrk((lpAccountName) ? lpAccountName : szAccountName, TEXT("\"*+,/\\:;<=>?[]|")) != NULL)
|
|
{
|
|
MessageBox(hwndDlg,
|
|
TEXT("The account name you entered is invalid! An account name must not contain the following characters: *+,/:;<=>?[\\]|"),
|
|
TEXT("ERROR"),
|
|
MB_OK | MB_ICONERROR);
|
|
return FALSE;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|