void fuh::set_lastlogin(const std::string& user, const std::time_t& lastlogin) { try { write_detail(user, "user_lastvisit", static_cast<int>(lastlogin)); } catch (const sql_error& e) { ERR_UH << "Could not set last visit for user '" << user << "' :" << e.message << std::endl; } }
void fuh::set_is_moderator(const std::string& name, const bool& is_moderator) { if(!user_exists(name)) return; try { write_detail(name, "user_is_moderator", is_moderator ? "1" : "0"); } catch (error& e) { ERR_UH << "Could not set is_moderator for user '" << name << "' :" << e.message << std::endl; } }
void fuh::set_lastlogin(const std::string& user, const time_t& lastlogin) { std::stringstream ss; ss << lastlogin; try { write_detail(user, "user_lastvisit", ss.str()); } catch (error& e) { ERR_UH << "Could not set last visit for user '" << user << "' :" << e.message << std::endl; } }