mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 18:14:26 +00:00
fix Checkstyle violations
This commit is contained in:
@@ -184,7 +184,7 @@ public class LDAPAuthentication implements AuthenticationMethod {
|
|||||||
* @param context
|
* @param context
|
||||||
* DSpace context, will be modified (ePerson set) upon success.
|
* DSpace context, will be modified (ePerson set) upon success.
|
||||||
*
|
*
|
||||||
* @param username
|
* @param netid
|
||||||
* Username (or email address) when method is explicit. Use null for
|
* Username (or email address) when method is explicit. Use null for
|
||||||
* implicit method.
|
* implicit method.
|
||||||
*
|
*
|
||||||
@@ -322,7 +322,7 @@ public class LDAPAuthentication implements AuthenticationMethod {
|
|||||||
log.info(LogHelper.getHeader(context,
|
log.info(LogHelper.getHeader(context,
|
||||||
"type=ldap-login", "type=ldap_but_already_email"));
|
"type=ldap-login", "type=ldap_but_already_email"));
|
||||||
context.turnOffAuthorisationSystem();
|
context.turnOffAuthorisationSystem();
|
||||||
setEpersonAttributes(context, eperson, ldap, Optional.of(netid));
|
setEpersonAttributes(context, eperson, ldap, Optional.of(netid));
|
||||||
ePersonService.update(context, eperson);
|
ePersonService.update(context, eperson);
|
||||||
context.dispatchEvents();
|
context.dispatchEvents();
|
||||||
context.restoreAuthSystemState();
|
context.restoreAuthSystemState();
|
||||||
@@ -380,7 +380,9 @@ public class LDAPAuthentication implements AuthenticationMethod {
|
|||||||
/**
|
/**
|
||||||
* Update eperson's attributes
|
* Update eperson's attributes
|
||||||
*/
|
*/
|
||||||
private void setEpersonAttributes(Context context, EPerson eperson, SpeakerToLDAP ldap, Optional<String> netid) throws SQLException {
|
private void setEpersonAttributes(Context context, EPerson eperson, SpeakerToLDAP ldap, Optional<String> netid)
|
||||||
|
throws SQLException {
|
||||||
|
|
||||||
if (StringUtils.isNotEmpty(ldap.ldapEmail)) {
|
if (StringUtils.isNotEmpty(ldap.ldapEmail)) {
|
||||||
eperson.setEmail(ldap.ldapEmail);
|
eperson.setEmail(ldap.ldapEmail);
|
||||||
}
|
}
|
||||||
@@ -389,7 +391,7 @@ public class LDAPAuthentication implements AuthenticationMethod {
|
|||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(ldap.ldapSurname)) {
|
if (StringUtils.isNotEmpty(ldap.ldapSurname)) {
|
||||||
eperson.setLastName(context, ldap.ldapSurname);
|
eperson.setLastName(context, ldap.ldapSurname);
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(ldap.ldapPhone)) {
|
if (StringUtils.isNotEmpty(ldap.ldapPhone)) {
|
||||||
ePersonService.setMetadataSingleValue(context, eperson, MD_PHONE, ldap.ldapPhone, null);
|
ePersonService.setMetadataSingleValue(context, eperson, MD_PHONE, ldap.ldapPhone, null);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user