Exemple #1
0
    //public string Referer;

    public LMEvent(string message, object eventSource, int eventCode, int eventDetailCode)
      : base(message, eventSource, WebEventCodes.WebExtendedBase + eventCode, eventDetailCode) {
      info = urlInfo.GetUrlInfo();
      cook = LMStatus.CookieLow;
      if (HttpContext.Current != null) {
        RequestUrl = HttpContext.Current.Request.Url.AbsolutePath;
        RequestUrl += ", agent = " + HttpContext.Current.Request.UserAgent;
        Uri rf = HttpContext.Current.Request.UrlReferrer;
        if (rf != null) RequestUrl += ", referer = " + rf.AbsoluteUri;
        //Referer = rf==null ? null : rf.AbsoluteUri;
      }
    }
Exemple #2
0
 public static ProfileData createUserEnd(urlInfo ui, Int64 id) {
   return createUserEnd(ui, id, 0);
 }
Exemple #3
0
    /// <summary>
    /// Pokus o zalozeni uzivatele: v pripade j*z existujiciho mailu vrati false.
    /// Nasledne posle aktivacni mail se zakodovanum UserId, eMail a Password
    /// ui==null => pouze zalozi uzivatele ale neposila email. Vyuzito napr pro eTestMe.com, v Q:\lmcom\RW2\Server\Services\MembersipNewService.svc.cs
    /// </summary>
    //public static Int64 createUserStart(urlInfo ui, string eMail, string psw, string firstName, string lastName) {
    //  Int64 id = LMComDataProvider.readProfileId (eMail, null);
    //  if (id>0) return -1;
    //  ProfileData prof = Profile;
    //  if (!prof.Anonymous) throw new Exception();
    //  prof = LMComDataProvider.createProfileStart(ui == null ? Domains.com : ui.SiteId);
    //  prof.ActivationMailSent = DateTime.UtcNow;
    //  prof.Address.FirstName = firstName; prof.Address.LastName = lastName;
    //  prof.Email = eMail; prof.Password = psw;
    //  if (ui != null) {
    //    if (Machines.debugNoInternet) {
    //      prof.Roles = 0; prof.ActivationMailSent = null; //simulace createUserEnd pro ladeni bez internetu
    //    } else
    //      MailSender.sendMail(MailTypes.ConfirmRegistration, ui.SiteId, ui.SubSite, ui.LangId, prof.Email, prof);
    //    loginProfile(prof);
    //  }
    //  LMComDataProvider.WriteProfile(prof);
    //  return prof.Id;
    //}

    /// <summary>
    /// Reakce na link z aktivacniho mailu: do profilu daneho Id vlozi Roles, cimz ucet aktivuje.
    /// </summary>
    public static ProfileData createUserEnd(urlInfo ui, Int64 id, Int64 roles) {
      ProfileData prof = LMComDataProvider.readProfile(id);
      if (prof == null) throw new Exception();
      if (prof.Site == Domains.sz) { //Prevod profilu z Vyuky
        prof.Site = Domains.com;
        prof.OtherType = OtherType.no;
        prof.OtherId = null;
      } else if (!prof.Anonymous)
        return null;
      prof.ActivationMailSent = null; prof.Roles = roles;
      if (ui != null) {
        loginProfile(prof);
      }
      LMComDataProvider.WriteProfile(prof);
      return prof;
    }