Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

LDAP.... Kleines Probl...

Empfohlene Antworten

Veröffentlicht

Hi,

ich hab ne einfache LDAP Abfrage nach dem Attribut Mail. Ich will prüfen ob eine E-Mail Adresse existiert oder nicht... Funzt auch super aber ich will die Fehlermeldung nicht mit ausgeben... Wie funzt das?



Warning: ldap_get_attributes(): supplied argument is not a valid 

ldap result entry resource in C:\Programme\Apache Group\Apache2

\htdocs\fandelm\entwicklung_projekt\ldap.php on line 22

Dieser Benutzer hat keine E-Mail...


if ($ds)
{
$r=ldap_bind($ds);
$sr=ldap_search($ds,"o=KVBIT, c=DE", "mail=beispielmailgibtsnicht@bitburg-pruem.de");
$info = ldap_get_entries($ds, $sr);
$entry = ldap_first_entry($ds, $sr);
$attrs = ldap_get_attributes($ds, $entry) or die ("Dieser Benutzer hat keine E-Mail...");

ldap_close($ds);
}
else
{
echo "<h4>Verbindung zum LDAP Server nicht möglich</h4>";
}
[/php]

Gruß

debitux


if ($ds)
{
$r=ldap_bind($ds);
$sr=ldap_search($ds,"o=KVBIT, c=DE", "mail=beispielmailgibtsnicht@bitburg-pruem.de");
$info = ldap_get_entries($ds, $sr);
$entry = ldap_first_entry($ds, $sr);
$attrs = @ldap_get_attributes($ds, $entry) or die ("Dieser Benutzer hat keine E-Mail...");

ldap_close($ds);
}
else
{
echo "<h4>Verbindung zum LDAP Server nicht möglich</h4>";
}
[/php]

-----------

or die ("Dieser Benutzer hat keine E-Mail...");

das würd ich nicht machen, dann sonst die ldap connection nie geschlossen wird!

bei "die()" wird die ausführung des scripts sofort gestoppt! (alias für exi())

besser so:

or echo ("Dieser Benutzer hat keine E-Mail...");

Gruß

kills

Danke kills ;-)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.