// swad_user_database.h: users, operations with database #ifndef _SWAD_USR_DB #define _SWAD_USR_DB /* SWAD (Shared Workspace At a Distance in Spanish), is a web platform developed at the University of Granada (Spain), and used to support university teaching. This file is part of SWAD core. Copyright (C) 1999-2021 Antonio Caņas Vargas This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ /*****************************************************************************/ /********************************** Headers **********************************/ /*****************************************************************************/ #include // To access MySQL databases #include // For boolean type #include // For time_t // #include "swad_action.h" // #include "swad_constant.h" // #include "swad_country.h" #include "swad_cryptography.h" // #include "swad_date.h" // #include "swad_degree.h" // #include "swad_icon.h" // #include "swad_layout.h" // #include "swad_menu.h" // #include "swad_nickname.h" // #include "swad_password.h" // #include "swad_privacy_visibility_type.h" // #include "swad_role_type.h" // #include "swad_scope.h" // #include "swad_search.h" // #include "swad_string.h" // #include "swad_theme.h" /*****************************************************************************/ /****************************** Public constants *****************************/ /*****************************************************************************/ /*****************************************************************************/ /******************************** Public types *******************************/ /*****************************************************************************/ /*****************************************************************************/ /****************************** Public prototypes ****************************/ /*****************************************************************************/ void Usr_DB_UpdateMyOffice (void); void Usr_DB_UpdateMyOfficePhone (void); void Usr_DB_UpdateMyLastWhatToSearch (void); bool Usr_DB_ChkIfUsrCodExists (long UsrCod); bool Usr_DB_ChkIfEncryptedUsrCodExists (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64]); bool Usr_DB_FindStrInUsrsNames (const char *Str); unsigned Usr_DB_GetNumUsrsWhoChoseAnOption (const char *SubQuery); unsigned Usr_DB_GetOldUsrs (MYSQL_RES **mysql_res,time_t SecondsWithoutAccess); void Usr_DB_RemoveUsrLastData (long UsrCod); void Usr_DB_RemoveUsrData (long UsrCod); #endif