50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using SteamWare;
|
|
using ScheMe_Data;
|
|
|
|
namespace ScheMe.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 = "Richiesta inoltrata all'amministratore, attendere sua risposta alla casella email indicata.";
|
|
lblOutUnauth.Visible = true;
|
|
}
|
|
else
|
|
{
|
|
lblOutUnauth.Text = "Attenzione! email non trovata, prego contattare amministratore!";
|
|
lblOutUnauth.Visible = true;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
lblOutUnauth.Text = "Attenzione! preogo inserire email valida!";
|
|
lblOutUnauth.Visible = true;
|
|
}
|
|
}
|
|
}
|
|
} |