Skip to content

Commit

Permalink
fix(login): unbind using connection
Browse files Browse the repository at this point in the history
  • Loading branch information
lksmsr committed Jun 30, 2023
1 parent 3e4432d commit cbf3ad0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function auth(
}

/* Authentifizierung des User */
if (($link_id = ldap_bind($connection, $user_dn, $password)) == false) {
if ((ldap_bind($connection, $user_dn, $password)) == false) {
print "Fehler: Authentifizierung fehlgeschlagen: $user_dn<br>";
return false;
}
Expand All @@ -72,7 +72,7 @@ function auth(
echo $initials; // Output: "JT"
$_SESSION['username'] = $initials;

ldap_unbind($link_id);
ldap_unbind($connection);
return true;
}

Expand Down

0 comments on commit cbf3ad0

Please sign in to comment.