Lines Matching full:if
43 * based directory. If you bind as a domain user, you can't fetch as
92 * If this is set to null then adLDAP will attempt to obtain this automatically from the rootDSE
106 * Array of domain controllers. Specifiy multiple controllers if you
126 * Setting to false will fudge "Domain Users" and is much faster. Keep in mind though that if
143 * If you wish to use TLS you should ensure that $useSSL is set to false and vice-versa
160 … * user_ingroup("Fred","C") will returns true with this option turned on, false if turned off
184 if ($this->ldapConnection) {
221 if (!$this->groupClass) {
240 if (!$this->userClass) {
259 if (!$this->folderClass) {
278 if (!$this->utilClass) {
297 if (!$this->contactClass) {
316 if (!$this->exchangeClass) {
335 if (!$this->computerClass) {
480 if($this->useSSL) {
528 if ($useSSO === true && !$this->ldapSaslSupported()) {
571 * @throws Exception - if unable to bind to Domain Controller
576 if (count($options) > 0) {
577 …if (array_key_exists("account_suffix",$options)){ $this->accountSuffix = $options["account_suffix"…
578 if (array_key_exists("base_dn",$options)){ $this->baseDn = $options["base_dn"]; }
579 if (array_key_exists("domain_controllers",$options)){
580 if (!is_array($options["domain_controllers"])) {
585 …if (array_key_exists("admin_username",$options)){ $this->adminUsername = $options["admin_username"…
586 …if (array_key_exists("admin_password",$options)){ $this->adminPassword = $options["admin_password"…
587 …if (array_key_exists("real_primarygroup",$options)){ $this->realPrimaryGroup = $options["real_prim…
588 if (array_key_exists("use_ssl",$options)){ $this->setUseSSL($options["use_ssl"]); }
589 if (array_key_exists("use_tls",$options)){ $this->useTLS = $options["use_tls"]; }
590 …if (array_key_exists("recursive_groups",$options)){ $this->recursiveGroups = $options["recursive_g…
591 if (array_key_exists("ad_port",$options)){ $this->setPort($options["ad_port"]); }
592 if (array_key_exists("sso",$options)) {
594 if (!$this->ldapSaslSupported()) {
600 if ($this->ldapSupported() === false) {
627 if ($this->useSSL) {
637 if ($this->useTLS) {
641 // Bind as a domain admin if they've set it up
642 if ($this->adminUsername !== NULL && $this->adminPassword !== NULL) {
644 if (!$this->ldapBind) {
645 if ($this->useSSL && !$this->useTLS) {
646 …// If you have problems troubleshooting, remove the @ character from the ldapldapBind command abov…
654 …if ($this->useSSO && $_SERVER['REMOTE_USER'] && $this->adminUsername === null && $_SERVER['KRB5CCN…
657 if (!$this->ldapBind){
666 if ($this->baseDn == NULL) {
679 if ($this->ldapConnection) {
694 if ($username === NULL || $password === NULL) { return false; }
695 if (empty($username) || empty($password)) { return false; }
698 …if ($this->useSSO && $_SERVER['REMOTE_USER'] && $_SERVER['REMOTE_USER'] == $username && $this->adm…
701 if (!$this->ldapBind) {
712 if (!$this->ldapBind){
716 // Cnce we've checked their details, kick back into admin mode if we have it
717 if ($this->adminUsername !== NULL && !$preventRebind) {
719 if (!$this->ldapBind){
746 if (!$this->ldapBind){ return (false); }
757 * This may indeed be a 'Success' message but if you get an unknown error
773 if (!function_exists('ldap_connect')) {
786 if (!function_exists('ldap_sasl_bind')) {
800 // LDAP doesn't like NULL attributes, only set them if they have values
801 // If you wish to remove an attribute you should set it to a space
805 // Check every attribute to see if it contains 8bit characters and then UTF8 encode them
808 if ($attributes["address_city"]){ $mod["l"][0]=$attributes["address_city"]; }
809 if ($attributes["address_code"]){ $mod["postalCode"][0]=$attributes["address_code"]; }
810 …//if ($attributes["address_country"]){ $mod["countryCode"][0]=$attributes["address_country"]; } //…
811 if ($attributes["address_country"]){ $mod["c"][0]=$attributes["address_country"]; }
812 if ($attributes["address_pobox"]){ $mod["postOfficeBox"][0]=$attributes["address_pobox"]; }
813 if ($attributes["address_state"]){ $mod["st"][0]=$attributes["address_state"]; }
814 … if ($attributes["address_street"]){ $mod["streetAddress"][0]=$attributes["address_street"]; }
815 if ($attributes["company"]){ $mod["company"][0]=$attributes["company"]; }
816 if ($attributes["change_password"]){ $mod["pwdLastSet"][0]=0; }
817 if ($attributes["department"]){ $mod["department"][0]=$attributes["department"]; }
818 if ($attributes["description"]){ $mod["description"][0]=$attributes["description"]; }
819 if ($attributes["display_name"]){ $mod["displayName"][0]=$attributes["display_name"]; }
820 if ($attributes["email"]){ $mod["mail"][0]=$attributes["email"]; }
821 …if ($attributes["expires"]){ $mod["accountExpires"][0]=$attributes["expires"]; } //unix epoch form…
822 if ($attributes["firstname"]){ $mod["givenName"][0]=$attributes["firstname"]; }
823 … if ($attributes["home_directory"]){ $mod["homeDirectory"][0]=$attributes["home_directory"]; }
824 if ($attributes["home_drive"]){ $mod["homeDrive"][0]=$attributes["home_drive"]; }
825 if ($attributes["initials"]){ $mod["initials"][0]=$attributes["initials"]; }
826 if ($attributes["logon_name"]){ $mod["userPrincipalName"][0]=$attributes["logon_name"]; }
827 …if ($attributes["manager"]){ $mod["manager"][0]=$attributes["manager"]; } //UNTESTED ***Use Disti…
828 if ($attributes["office"]){ $mod["physicalDeliveryOfficeName"][0]=$attributes["office"]; }
829 …if ($attributes["password"]){ $mod["unicodePwd"][0]=$this->user()->encodePassword($attributes["pas…
830 if ($attributes["profile_path"]){ $mod["profilepath"][0]=$attributes["profile_path"]; }
831 if ($attributes["script_path"]){ $mod["scriptPath"][0]=$attributes["script_path"]; }
832 if ($attributes["surname"]){ $mod["sn"][0]=$attributes["surname"]; }
833 if ($attributes["title"]){ $mod["title"][0]=$attributes["title"]; }
834 if ($attributes["telephone"]){ $mod["telephoneNumber"][0]=$attributes["telephone"]; }
835 if ($attributes["mobile"]){ $mod["mobile"][0]=$attributes["mobile"]; }
836 if ($attributes["pager"]){ $mod["pager"][0]=$attributes["pager"]; }
837 if ($attributes["ipphone"]){ $mod["ipphone"][0]=$attributes["ipphone"]; }
838 if ($attributes["web_page"]){ $mod["wWWHomePage"][0]=$attributes["web_page"]; }
839 if ($attributes["fax"]){ $mod["facsimileTelephoneNumber"][0]=$attributes["fax"]; }
840 if ($attributes["enabled"]){ $mod["userAccountControl"][0]=$attributes["enabled"]; }
841 if ($attributes["homephone"]){ $mod["homephone"][0]=$attributes["homephone"]; }
844 …if ($attributes["group_sendpermission"]){ $mod["dlMemSubmitPerms"][0]=$attributes["group_sendpermi…
845 …if ($attributes["group_rejectpermission"]){ $mod["dlMemRejectPerms"][0]=$attributes["group_rejectp…
848 if ($attributes["exchange_homemdb"]){ $mod["homeMDB"][0]=$attributes["exchange_homemdb"]; }
849 …if ($attributes["exchange_mailnickname"]){ $mod["mailNickname"][0]=$attributes["exchange_mailnickn…
850 …if ($attributes["exchange_proxyaddress"]){ $mod["proxyAddresses"][0]=$attributes["exchange_proxyad…
851 …if ($attributes["exchange_usedefaults"]){ $mod["mDBUseDefaults"][0]=$attributes["exchange_usedefau…
852 …if ($attributes["exchange_policyexclude"]){ $mod["msExchPoliciesExcluded"][0]=$attributes["exchang…
853 …if ($attributes["exchange_policyinclude"]){ $mod["msExchPoliciesIncluded"][0]=$attributes["exchang…
854 …if ($attributes["exchange_addressbook"]){ $mod["showInAddressBook"][0]=$attributes["exchange_addre…
855 …if ($attributes["exchange_altrecipient"]){ $mod["altRecipient"][0]=$attributes["exchange_altrecipi…
856 …if ($attributes["exchange_deliverandredirect"]){ $mod["deliverAndRedirect"][0]=$attributes["exchan…
859 …if ($attributes["exchange_hidefromlists"]){ $mod["msExchHideFromAddressLists"][0]=$attributes["exc…
860 if ($attributes["contact_email"]){ $mod["targetAddress"][0]=$attributes["contact_email"]; }
865 if ($attributes["firstname"] && $attributes["surname"]){
872 if (count($mod)==0){ return (false); }
881 if (is_string($item)) {
883 if (ord($item[$i]) >> 7) {
888 if ($encode === true && $key != 'password') {
901 /*if (sizeof($this->domainControllers) > 1) {
903 // Test if the controller is responding to pings
905 if ($ping === false) {
928 if ($errno > 0) {