PHPackages                             nusait/nuldap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. nusait/nuldap

ActiveLibrary

nusait/nuldap
=============

2.1.4(10y ago)06621[2 issues](https://github.com/nusait/nuldap/issues)[1 PRs](https://github.com/nusait/nuldap/pulls)3PHPPHP &gt;=5.3.0

Since Aug 19Pushed 9y ago6 watchersCompare

[ Source](https://github.com/nusait/nuldap)[ Packagist](https://packagist.org/packages/nusait/nuldap)[ RSS](/packages/nusait-nuldap/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (5)Dependencies (1)Versions (8)Used By (3)

NuLdap
======

[](#nuldap)

This is a LDAP package meant for Northwestern University. (But can be extended for other entities)

Installation via Composer
-------------------------

[](#installation-via-composer)

```
composer require nusait/nuldap

```

Then update composer

```
composer update

```

New Instance:
-------------

[](#new-instance)

```
$ldap = new Nusait\Nuldap\NuLdap($rdn, $password, $host, $port);
```

(all parameters are optional); if you do not put `$rdn` or `$password`, you can still validate, but cannot `searchNetid`. After instantiating, you can still set the rdn and password with `setRdn` and `setPassword` respectively.

Validate:
---------

[](#validate)

```
$ldap->validate($netid, $password);
```

returns a boolean

Searching:
----------

[](#searching)

You can search by netid, email, emplid, or studentid.

```
$ldap->search('netid', $netid);
$ldap->search('email', $email);
$ldap->search('emplid', $emplid);
$ldap->search('studentid', $studentid);
```

This returns the raw ldap metadata.

You can also search using the magic methods:

```
$ldap->searchNetid($netid);
$ldap->searchEmail($email);
$ldap->searchEmplid($emplid);
$ldap->searchStudentid($studentid);
```

Parsing User
------------

[](#parsing-user)

```
$ldap->parseUser($ldapUser [, $transformer ]);
```

You can parse the raw metadata of a user to create an associative array of the user. You can pass your own transformer into the function. The transformer must implement the TransformerInterface in the Contracts folder.

The default transforms maps the following keys and value:

```
return [
    'netid'       => $this->getSetValueOrNull($ldapUser, 'uid'),
    'phone'       => $this->getSetValueOrNull($ldapUser, 'telephonenumber'),
    'email'       => $this->getSetValueOrNull($ldapUser, 'mail'),
    'title'       => $this->getSetValueOrNull($ldapUser, 'title'),
    'first_name'  => $this->getSetValueOrNull($ldapUser, 'givenname'),
    'last_name'   => $this->getSetValueOrNull($ldapUser, 'sn'),
    'displayname' => $this->getSetValueOrNull($ldapUser, 'displayname'),
    'emplid'      => (int)$this->getSetValueOrNull($ldapUser, 'employeenumber'),
    'studentid'   => (int)$this->getSetValueOrNull($ldapUser, 'nustudentnumber')
];
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 89.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~105 days

Recently: every ~46 days

Total

7

Last Release

3656d ago

Major Versions

1.0.0 → 2.0.02015-11-09

### Community

Maintainers

![](https://www.gravatar.com/avatar/519539ad4a194df792ca370f9272589dc03d93518ea98178411fd3309206aea9?d=identicon)[nusait](/maintainers/nusait)

---

Top Contributors

[![azamtav](https://avatars.githubusercontent.com/u/2217592?v=4)](https://github.com/azamtav "azamtav (34 commits)")[![howlowck](https://avatars.githubusercontent.com/u/338265?v=4)](https://github.com/howlowck "howlowck (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nusait-nuldap/health.svg)

```
[![Health](https://phpackages.com/badges/nusait-nuldap/health.svg)](https://phpackages.com/packages/nusait-nuldap)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
