Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
School of Music Attendance
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tim Steiner
School of Music Attendance
Commits
3b91acad
Commit
3b91acad
authored
6 years ago
by
Roger Feese
Browse files
Options
Downloads
Plain Diff
Merge branch 'ldap-to-ad' into 'master'
Ldap to ad See merge request
!5
parents
da75fd97
d8bbe0da
No related branches found
No related tags found
1 merge request
!5
Ldap to ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/config.php.sample
+2
-2
2 additions, 2 deletions
include/config.php.sample
include/user.class.php
+2
-2
2 additions, 2 deletions
include/user.class.php
with
4 additions
and
4 deletions
include/config.php.sample
+
2
−
2
View file @
3b91acad
...
...
@@ -9,8 +9,8 @@ class Config
$this
->
studentDsn
=
'mysql://username:password@hostname/database'
;
$this
->
verifiedDir
=
__DIR__
.
'/../verified'
;
$this
->
filesPath
=
__DIR__
.
'/../import'
;
$this
->
ldapHost
=
'
example.com
'
;
$this
->
ldapDn
=
'
uid=nobody,dc=example
,dc=
com
'
;
$this
->
ldapHost
=
'
unl.edu
'
;
$this
->
ldapDn
=
'
cn=service-account-name,ou=service,dc=unl
,dc=
edu
'
;
$this
->
ldapPassword
=
'password'
;
}
...
...
This diff is collapsed.
Click to expand it.
include/user.class.php
+
2
−
2
View file @
3b91acad
...
...
@@ -55,7 +55,7 @@ class User
$r
=
ldap_bind
(
$ds
,
Config
::
getInstance
()
->
ldapDn
,
Config
::
getInstance
()
->
ldapPassword
);
if
(
!
$r
)
throw
new
Exception
(
'Could not bind to UNL LDAP server. ('
.
ldap_errno
(
$ds
)
.
'): '
.
ldap_error
(
$ds
)
);
$filter
=
'
uid
='
.
$username
;
$filter
=
'
cn
='
.
$username
;
$sr
=
ldap_search
(
$ds
,
'ou=people,dc=unl,dc=edu'
,
$filter
);
if
(
!
$sr
)
throw
new
Exception
(
'Search of UNL LDAP server failed. ('
.
ldap_errno
(
$ds
)
.
'): '
.
ldap_error
(
$ds
)
);
...
...
@@ -78,7 +78,7 @@ class User
$data
=
array
(
'nuid'
=>
$info
[
0
][
'unluncwid'
][
0
],
'user_name'
=>
$info
[
0
][
'
uid
'
][
0
],
'user_name'
=>
$info
[
0
][
'
cn
'
][
0
],
'first_name'
=>
$info
[
0
][
'givenname'
][
0
],
'last_name'
=>
$info
[
0
][
'sn'
][
0
],
'email'
=>
$info
[
0
][
'mail'
][
0
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment