#include "stg/users.h"
#include "stg/user.h"
-#include "stg/common.h"
#include <strings.h> // strcasecmp
void USER_INFO::CreateAnswer()
{
- CONST_USER_PTR u;
+ using ConstUserPtr = const User*;
+ ConstUserPtr u;
if (m_users.FindByName(m_login, &u))
{
m_answer = "<UserInfo result=\"error\"/>";
return;
}
- m_answer = "<UserInfo lastAuthTime=\"" + x2str(u->GetAuthorizedModificationTime()) + "\"" +
- " lastDisconnectTime=\"" + x2str(u->GetConnectedModificationTime()) + "\"" +
+ m_answer = "<UserInfo lastAuthTime=\"" + std::to_string(u->GetAuthorizedModificationTime()) + "\"" +
+ " lastDisconnectTime=\"" + std::to_string(u->GetConnectedModificationTime()) + "\"" +
" connected=\"" + (u->GetConnected() ? "true" : "false") + "\"" +
" lastDisconnectReason=\"" + u->GetLastDisconnectReason() + "\">";
std::vector<std::string> list(u->GetAuthorizers());