Version 18.8.2

This commit is contained in:
Antonio Cañas Vargas 2018-10-25 14:29:38 +02:00
parent 75530780eb
commit 86751f95b9
3 changed files with 24 additions and 21 deletions

View File

@ -433,10 +433,15 @@ void Acc_ShowFormGoToRequestNewAccount (void)
void Acc_ShowFormChgMyAccount (void)
{
bool IMustFillNickname = false;
bool IMustFillEmail = false;
bool IShouldConfirmEmail = false;
bool IShouldFillID = false;
extern const char *Txt_Before_going_to_any_other_option_you_must_create_your_password;
extern const char *Txt_Before_going_to_any_other_option_you_must_fill_your_nickname;
extern const char *Txt_Please_fill_in_your_email_address;
bool IMustFillPassword = (Gbl.Usrs.Me.UsrDat.Password[0] == '\0');
bool IMustFillNickname = (Gbl.Usrs.Me.UsrDat.Nickname[0] == '\0');
bool IMustFillEmail = (Gbl.Usrs.Me.UsrDat.Email[0] == '\0');
bool IShouldConfirmEmail = (!Gbl.Usrs.Me.UsrDat.EmailConfirmed && // Email not yet confirmed
!Gbl.Usrs.Me.ConfirmEmailJustSent); // Do not ask for email confirmation when confirmation email is just sent
bool IShouldFillID = (Gbl.Usrs.Me.UsrDat.IDs.Num == 0);
/***** Get current user's nickname and email address
It's necessary because current nickname or email could be just updated *****/
@ -444,18 +449,15 @@ void Acc_ShowFormChgMyAccount (void)
Mai_GetEmailFromUsrCod (&Gbl.Usrs.Me.UsrDat);
/***** Check nickname, email and ID *****/
if (!Gbl.Usrs.Me.UsrDat.Nickname[0])
IMustFillNickname = true;
else if (!Gbl.Usrs.Me.UsrDat.Email[0])
IMustFillEmail = true;
else
{
if (!Gbl.Usrs.Me.UsrDat.EmailConfirmed && // Email not yet confirmed
!Gbl.Usrs.Me.ConfirmEmailJustSent) // Do not ask for email confirmation when confirmation email is just sent
IShouldConfirmEmail = true;
if (!Gbl.Usrs.Me.UsrDat.IDs.Num)
IShouldFillID = true;
}
if (IMustFillPassword)
Ale_ShowAlert (Ale_WARNING,
Txt_Before_going_to_any_other_option_you_must_create_your_password);
if (IMustFillNickname)
Ale_ShowAlert (Ale_WARNING,
Txt_Before_going_to_any_other_option_you_must_fill_your_nickname);
if (IMustFillEmail)
Ale_ShowAlert (Ale_WARNING,
Txt_Please_fill_in_your_email_address);
/***** Start container for this user *****/
fprintf (Gbl.F.Out,"<div class=\"REC_USR\">");
@ -753,7 +755,7 @@ void Acc_CreateNewUsr (struct UsrData *UsrDat,bool CreatingMyOwnAccount)
"'%s','%s',"
"'%s','%s','%s',"
"%s,'%s',"
"%u,%u,-1,0",
"%u,%u,-1,0)",
UsrDat->EncryptedUsrCod,
UsrDat->Password,
UsrDat->Surname1,UsrDat->Surname2,UsrDat->FirstName,

View File

@ -99,8 +99,7 @@ void Ale_ShowAlert (Ale_AlertType_t AlertType,const char *Txt)
if (AlertType != Ale_NONE)
Ale_ShowAlertAndButton (AlertType,Txt,
ActUnk,NULL,NULL,NULL,Btn_NO_BUTTON,NULL);
Ale_ResetAlert ();
// Ale_ResetAlert ();
}
void Ale_ShowAlertAndButton (Ale_AlertType_t AlertType,const char *Txt,

View File

@ -355,11 +355,13 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 18.8.1 (2018-10-25)"
#define Log_PLATFORM_VERSION "SWAD 18.8.2 (2018-10-25)"
#define CSS_FILE "swad18.4.css"
#define JS_FILE "swad17.17.1.js"
/*
Version 18.8.1: Oct 25, 2018 Fixed bug in password, reported by Francisco A. Ocaña. (238047 lines)
Version 18.8.2: Oct 25, 2018 Changes in alerts.
Fixed bug in account creation. (238051 lines)
Version 18.8.1: Oct 25, 2018 Fixed bug in password, reported by Francisco A. Ocaña and Ana del Carmen Ruiz Reina. (238047 lines)
Version 18.8: Oct 25, 2018 New internal functions to build database queries. (238043 lines)
Version 18.7.42: Oct 25, 2018 Some sprintf for database queries changed by asprintf. (238146 lines)
Version 18.7.41: Oct 24, 2018 Some sprintf for database queries changed by asprintf. (238125 lines)