Patch level :2.0 aga
Files correlati :ba0.exe Ricompilazione Demo : [ ] Commento :sistemato il problema delle password di login git-svn-id: svn://10.65.10.50/trunk@10851 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c038c3e3dd
commit
1ec6b14b60
@ -692,23 +692,21 @@ bool TMenu_application::check_user()
|
||||
|
||||
utente = m.get(F_USER);
|
||||
const TString& pass = m.get(F_PASSWORD);
|
||||
pwd = "";
|
||||
|
||||
TLocalisamfile users(LF_USER);
|
||||
users.put("USERNAME", utente);
|
||||
if (users.read() != NOERR)
|
||||
users.zero();
|
||||
|
||||
pwd = "";
|
||||
if (users.status() != NOERR)
|
||||
if (users.read() == NOERR)
|
||||
{
|
||||
pwd = decode(users.get("PASSWORD"));
|
||||
}
|
||||
else
|
||||
{
|
||||
users.zero();
|
||||
if (utente == dongle().administrator(&pwd))
|
||||
{
|
||||
users.put("USERNAME", utente);
|
||||
users.put("USERDESC", utente);
|
||||
users.put("USERDESC", "Amministratore");
|
||||
users.put("PASSWORD", encode(pwd));
|
||||
users.write();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user