53 lines
1.9 KiB
C#
53 lines
1.9 KiB
C#
using SteamWare;
|
|
using System;
|
|
|
|
namespace CMS_SC.WebUserControls
|
|
{
|
|
public partial class mod_enrollByEmail : System.Web.UI.UserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
/// <summary>
|
|
/// richiesta reset dispositivi utente
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnReqNewKey_Click(object sender, EventArgs e)
|
|
{
|
|
// controllo email & co...
|
|
string email = txtEmailReq.Text.Trim();
|
|
if (email != "" && email.IndexOf("@") > 0)
|
|
{
|
|
// ora controllo che l'email SIA nell'elenco delle email degli utenti...
|
|
if (devicesAuthProxy.stObj.checkUserEmail(email))
|
|
{
|
|
// registro richiesta reset ed invio email ad admin...
|
|
devicesAuthProxy.stObj.reqResetAuthKey(email, memLayer.ML.confReadString("adminEmail"));
|
|
lblOutUnauth.Text = traduci("ErrorEAE01");//"Richiesta inoltrata all'amministratore, attendere sua risposta alla casella email indicata.";
|
|
lblOutUnauth.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
lblOutUnauth.Text = traduci("ErrorEAE02");//"Attenzione! email non trovata, prego contattare amministratore!";
|
|
lblOutUnauth.Visible = true;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
lblOutUnauth.Text = traduci("ErrorEAE03");//"Attenzione! preogo inserire email valida!";
|
|
lblOutUnauth.Visible = true;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// wrapper traduzione
|
|
/// </summary>
|
|
/// <param name="lemma"></param>
|
|
/// <returns></returns>
|
|
public string traduci(string lemma)
|
|
{
|
|
return user_std.UtSn.Traduci(lemma);
|
|
}
|
|
}
|
|
} |