Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public ActionResult ChangeEMail()
        {
            var user = UserManager.FindById(User.Identity.GetUserId());

            ViewBag.User = user;

            return(View());
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="allSubscriptions"></param>
        /// <param name="group"></param>
        /// <returns></returns>
        public List <OccurrenceSubscription> GetSubscriptionsForGroup(ICollection <OccurrenceSubscription> allSubscriptions, OccurrenceGroup group)
        {
            var semSubService = new SemesterSubscriptionService();

            var subList = new List <OccurrenceSubscription>();

            foreach (var subscription in allSubscriptions)
            {
                var user = UserManager.FindById(subscription.UserId);
                if (user != null)
                {
                    bool isInGroup = semSubService.IsSubscribed(user.Id, group.SemesterGroups, group.Occurrence.UseExactFit);

                    if (isInGroup)
                    {
                        subList.Add(subscription);
                    }
                }
            }

            return(subList);
        }