Version 16.19.1

This commit is contained in:
Antonio Cañas Vargas 2016-10-10 19:50:24 +02:00
parent 97624f3d5b
commit ce45f328b4
5 changed files with 44 additions and 29 deletions

View File

@ -462,12 +462,17 @@ void Acc_ShowFormChangeMyAccount (void)
Acc_PrintAccountSeparator ();
/***** E-mail *****/
if (IMustFillEmail || IShouldConfirmEmail)
if (IMustFillEmail || IShouldConfirmEmail ||
Gbl.Usrs.Me.ConfirmEmailJustSent)
{
fprintf (Gbl.F.Out,"<tr>"
"<td colspan=\"2\">");
Lay_ShowAlert (Lay_WARNING,IMustFillEmail ? Txt_Please_fill_in_your_email_address :
Txt_Please_check_and_confirm_your_email_address);
if (IMustFillEmail)
Lay_ShowAlert (Lay_WARNING,Txt_Please_fill_in_your_email_address);
else if (IShouldConfirmEmail)
Lay_ShowAlert (Lay_WARNING,Txt_Please_check_and_confirm_your_email_address);
else // Gbl.Usrs.Me.ConfirmEmailJustSent
Mai_ShowMsgConfirmEmailHasBeenSent ();
fprintf (Gbl.F.Out,"</td>"
"</tr>");
}

View File

@ -148,13 +148,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.19 (2016-10-10)"
#define Log_PLATFORM_VERSION "SWAD 16.19.1 (2016-10-10)"
#define CSS_FILE "swad15.229.css"
#define JS_FILE "swad15.238.1.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 16.19.1: Oct 10, 2016 Message to report that confirmation e-mail has been sent. (? lines)
Version 16.19: Oct 10, 2016 Warning in User > Session to confirm user's e-mail address.
Changes in form to edit user's account. (205194 lines)
Version 16.18.1: Oct 10, 2016 Warning in User > Account to confirm user's e-mail address. (205116 lines)

View File

@ -1372,7 +1372,6 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
{
extern const char *Txt_The_email_address_X_matches_one_previously_registered;
extern const char *Txt_The_email_address_X_has_been_registered_successfully;
extern const char *Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address;
extern const char *Txt_The_email_address_X_had_been_registered_by_another_user;
extern const char *Txt_The_email_address_entered_X_is_not_valid;
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
@ -1409,11 +1408,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
to confirm the new email address *****/
if (ItsMe)
if (Mai_SendMailMsgToConfirmEmail ())
{
sprintf (Gbl.Message,Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address,
Gbl.Usrs.Me.UsrDat.Email);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
}
Mai_ShowMsgConfirmEmailHasBeenSent ();
}
else
{
@ -1545,7 +1540,6 @@ bool Mai_SendMailMsgToConfirmEmail (void)
ReturnCode = system (Command);
if (ReturnCode == -1)
Lay_ShowErrorAndExit ("Error when running script to send e-mail.");
Gbl.Usrs.Me.ConfirmEmailJustSent = true;
/***** Remove temporary file *****/
unlink (Gbl.Msg.FileNameMail);
@ -1555,6 +1549,7 @@ bool Mai_SendMailMsgToConfirmEmail (void)
switch (ReturnCode)
{
case 0: // Message sent successfully
Gbl.Usrs.Me.ConfirmEmailJustSent = true;
return true;
case 1:
Lay_ShowAlert (Lay_WARNING,Txt_There_was_a_problem_sending_an_email_automatically);
@ -1569,14 +1564,27 @@ bool Mai_SendMailMsgToConfirmEmail (void)
}
/*****************************************************************************/
/************************* Set my pending password ***************************/
/******* Show alert to report that confirmation e-mail has been sent *********/
/*****************************************************************************/
void Mai_ShowMsgConfirmEmailHasBeenSent (void)
{
extern const char *Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address;
sprintf (Gbl.Message,Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address,
Gbl.Usrs.Me.UsrDat.Email);
Lay_ShowAlert (Lay_INFO,Gbl.Message);
}
/*****************************************************************************/
/************************* Insert mail hey in database ***********************/
/*****************************************************************************/
static void Mai_InsertMailKey (const char *Email,const char MailKey[Mai_LENGTH_EMAIL_CONFIRM_KEY+1])
{
char Query[512+Mai_LENGTH_EMAIL_CONFIRM_KEY];
/***** Remove expired pending passwords from database *****/
/***** Remove expired pending e-mails from database *****/
sprintf (Query,"DELETE FROM pending_emails"
" WHERE DateAndTime<FROM_UNIXTIME(UNIX_TIMESTAMP()-'%lu')",
Cfg_TIME_TO_DELETE_OLD_PENDING_EMAILS);

View File

@ -83,6 +83,7 @@ bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char *NewEmail);
void Mai_PutButtonToCheckEmailAddress (void);
bool Mai_SendMailMsgToConfirmEmail (void);
void Mai_ShowMsgConfirmEmailHasBeenSent (void);
void Mai_ConfirmEmail (void);
void Mai_CreateFileNameMail (void);

View File

@ -1418,39 +1418,39 @@ const char *Txt_A_face_marked_in_red_has_been_detected_ =
const char *Txt_A_message_has_been_sent_to_email_address_X_to_confirm_that_address = // Warning: it is very important to include %s in the following sentences
#if L==1
"Se ha enviado un mensaje"
" a la direcci&oacute;n de correo %s"
" a la direcci&oacute;n de correo <strong>%s</strong>"
" para confirmar dicha direcci&oacute;n."; // Necessita traduccio
#elif L==2
"A message has been sent"
" to e-mail address %s"
" to e-mail address <strong>%s</strong>"
" to confirm that address."; // Need Übersetzung
#elif L==3
"A message has been sent"
" to e-mail address %s"
" to e-mail address <strong>%s</strong>"
" to confirm that address.";
#elif L==4
"Se ha enviado un mensaje"
" a la direcci&oacute;n de correo %s"
" a la direcci&oacute;n de correo <strong>%s</strong>"
" para confirmar dicha direcci&oacute;n.";
#elif L==5
"A message has been sent"
" to e-mail address %s"
" to e-mail address <strong>%s</strong>"
" to confirm that address."; // Besoin de traduction
#elif L==6
"Se ha enviado un mensaje"
" a la direcci&oacute;n de correo %s"
" a la direcci&oacute;n de correo <strong>%s</strong>"
" para confirmar dicha direcci&oacute;n."; // Okoteve traducción
#elif L==7
"A message has been sent"
" to e-mail address %s"
" to e-mail address <strong>%s</strong>"
" to confirm that address."; // Bisogno di traduzione
#elif L==8
"A message has been sent"
" to e-mail address %s"
" to e-mail address <strong>%s</strong>"
" to confirm that address."; // Potrzebujesz tlumaczenie
#elif L==9
"A message has been sent"
" to e-mail address %s"
" to e-mail address <strong>%s</strong>"
" to confirm that address."; // Necessita de tradução
#endif
@ -42243,31 +42243,31 @@ const char *Txt_The_email_address_entered_X_is_not_valid = // Warning: it is ver
const char *Txt_The_email_address_X_had_been_registered_by_another_user = // Warning: it is very important to include %s in the following sentences
#if L==1
"La direcci&oacute;n de correo <strong>%s</strong>"
" ya hab&iacute;a sido registrada por otro usuario."; // Necessita traduccio
" ya ha sido registrada por otro usuario."; // Necessita traduccio
#elif L==2
"The e-mail address <strong>%s</strong>"
" had been registered by another user."; // Need Übersetzung
" had been registered by another user."; // Need Übersetzung
#elif L==3
"The e-mail address <strong>%s</strong>"
" had been registered by another user.";
#elif L==4
"La direcci&oacute;n de correo <strong>%s</strong>"
" ya hab&iacute;a sido registrada por otro usuario.";
" ya ha sido registrada por otro usuario.";
#elif L==5
"The e-mail address <strong>%s</strong>"
" had been enrolled by another user."; // Besoin de traduction
" had been enrolled by another user."; // Besoin de traduction
#elif L==6
"La direcci&oacute;n de correo <strong>%s</strong>"
" ya hab&iacute;a sido registrada por otro usuario."; // Okoteve traducción
" ya ha sido registrada por otro usuario."; // Okoteve traducción
#elif L==7
"Il e-mail <strong>%s</strong>"
" &egrave; stato registrato da un altro utente.";
#elif L==8
"The e-mail address <strong>%s</strong>"
" had been registered by another user."; // Potrzebujesz tlumaczenie
" had been registered by another user."; // Potrzebujesz tlumaczenie
#elif L==9
"The e-mail address <strong>%s</strong>"
" had been registered by another user."; // Necessita de tradução
" had been registered by another user."; // Necessita de tradução
#endif
const char *Txt_The_email_address_X_has_been_registered_successfully = // Warning: it is very important to include %s in the following sentences