public_html/cloud/data/updater-ocbuvdlb4ccs/backups/nextcloud-11.0.0.10/apps/user_ldap/lib/User/User.php
/**
	 * fetches the email from LDAP and stores it as ownCloud user value
	 * @param string $valueFromLDAP if known, to save an LDAP read request
	 * @return null
	 */
fetches the email from LDAP and stores it as ownCloud user value
@param string $valueFromLDAP if known, to save an LDAP read request
@return null
fetches the email from LDAP and stores it as ownCloud user value @param string $valueFromLDAP if known to save an LDAP read request @return null
public function updateEmail($valueFromLDAP = null) {
		if($this->wasRefreshed('email')) {
			return;
		}
		$email = strval($valueFromLDAP);
		if(is_null($valueFromLDAP)) {
			$emailAttribute = $this->connection->ldapEmailAttribute;
			if ($emailAttribute !== '') {
				$aEmail = $this->access->readAttribute($this->dn, $emailAttribute);
				if(is_array($aEmail) && (count($aEmail) > 0)) {
					$email = strval($aEmail[0]);
				}
			}
		}
		if ($email !== '') {
			$user = $this->userManager->get($this->uid);
			if (!is_null($user)) {
				$currentEmail = strval($user->getEMailAddress());
				if ($currentEmail !== $email) {
					$user->setEMailAddress($email);
				}
			}
		}
	}
public function updateEmail ( $ valueFromLDAP = null ) { if ( $ this -> wasRefreshed ( 'email' ) ) { return ; } $ email = strval ( $ valueFromLDAP ) ; if ( is_null ( $ valueFromLDAP ) ) { $ emailAttribute = $ this -> connection -> ldapEmailAttribute ; if ( $ emailAttribute !== '' ) { $ aEmail = $ this -> access -> readAttribute ( $ this -> dn , $ emailAttribute ) ; if ( is_array ( $ aEmail ) && ( count ( $ aEmail ) > 0 ) ) { $ email = strval ( $ aEmail [ 0 ] ) ; } } } if ( $ email !== '' ) { $ user = $ this -> userManager -> get ( $ this -> uid ) ; if ( ! is_null ( $ user ) ) { $ currentEmail = strval ( $ user -> getEMailAddress ( ) ) ; if ( $ currentEmail !== $ email ) { $ user -> setEMailAddress ( $ email ) ; } } } }
fetches the email from LDAP and stores it as ownCloud user value
 @param string $valueFromLDAP if known, to save an LDAP read request
 @return null
fetches the email from LDAP and stores it as ownCloud user value @param string $valueFromLDAP if known to save an LDAP read request @return null