Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
3e55def7
Commit
3e55def7
authored
Nov 30, 2020
by
Lisa Seeto
Committed by
Gerrit Code Review
Nov 30, 2020
Browse files
Merge "Bug 1903592: Only try to check the email if supplied"
parents
6deb237e
8bcb937f
Changes
2
Show whitespace changes
Inline
Side-by-side
htdocs/auth/ldap/lang/en.utf8/auth.ldap.php
View file @
3e55def7
...
...
@@ -16,6 +16,7 @@ $string['ldapconfig'] = 'LDAP configuration';
$string
[
'description'
]
=
'Authenticate against an LDAP server'
;
$string
[
'notusable'
]
=
'Please install the PHP LDAP extension'
;
$string
[
'emailmissing'
]
=
'The email address is missing.'
;
$string
[
'attributename'
]
=
'Name of the LDAP attribute used to sync groups based on its values (required and must respect case)'
;
$string
[
'cannotdeleteandsuspend'
]
=
'Cannot specify -d and -s at the same time.'
;
$string
[
'cli_info_sync_groups'
]
=
'This command line PHP script will attempt to synchronize an institution list of groups with an LDAP directory.
...
...
htdocs/auth/ldap/lib.php
View file @
3e55def7
...
...
@@ -1353,10 +1353,11 @@ class AuthLdap extends Auth {
var_dump
(
$todb
);
}
//check for used email
if
(
if
(
!
empty
(
$todb
->
email
)
&&
(
(
$d1
=
get_record
(
'usr'
,
'email'
,
$todb
->
email
))
||
(
$d2
=
get_record
(
'artefact_internal_profile_email'
,
'email'
,
$todb
->
email
))
)
)
{
if
(
empty
(
$d1
))
{
$d1
=
get_record
(
'usr'
,
'id'
,
$d2
->
owner
);
...
...
@@ -1368,6 +1369,10 @@ class AuthLdap extends Auth {
log_warn
(
get_string
(
'emailalreadytaken'
,
'auth.internal'
)
.
' '
.
$d1
->
username
.
' '
.
$todb
->
email
);
$nberrors
++
;
}
else
if
(
empty
(
$todb
->
email
))
{
log_warn
(
get_string
(
'emailmissing'
,
'auth.ldap'
)
.
' '
.
$ldapusername
);
$nberrors
++
;
}
else
{
if
(
!
$dryrun
)
{
create_user
(
$todb
,
array
(),
$this
->
institution
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment