Esempio n. 1
0
        private void SyncLDAP()
        {
            var t = CoreContext.TenantManager.GetCurrentTenant();

            var currentDomainSettings = LdapCurrentDomain.Load();

            if (string.IsNullOrEmpty(currentDomainSettings.CurrentDomain) || currentDomainSettings.CurrentDomain != Importer.LDAPDomain)
            {
                currentDomainSettings.CurrentDomain = Importer.LDAPDomain;
                currentDomainSettings.Save();
            }

            if (!LDAPSettings.GroupMembership)
            {
                Logger.Debug("SyncLDAPUsers()");

                SyncLDAPUsers();
            }
            else
            {
                Logger.Debug("SyncLDAPUsersInGroups()");

                SyncLDAPUsersInGroups();
            }

            SyncLdapAvatar();

            SyncLdapAccessRights();
        }
Esempio n. 2
0
        private void ProcessConfirmedEmailLdap()
        {
            if (IsPostBack)
            {
                return;
            }

            var login = (Request.QueryString["ldap-login"] ?? "").Trim();

            if (String.IsNullOrEmpty(login))
            {
                return;
            }

            Login        = login;
            LoginMessage = String.Format("<div class=\"confirmBox\">{0}<br>{1} {2}</div>",
                                         Resource.MessageEmailConfirmed,
                                         Resource.MessageAuthorizeLdap,
                                         LdapCurrentDomain.Load().CurrentDomain);
        }