mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-09 19:13:18 +00:00
Replace deprecated setMetadata() that uses removed field names. #2956
Once upon a time, DSOs had dedicated fields for some metadata. These were moved into the Metadatavalue table long ago, but there were still methods which used the old field names instead of proper MetadataField triplets.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
*/
|
||||
package org.dspace.authenticate;
|
||||
|
||||
import static org.dspace.eperson.service.EPersonService.MD_PHONE;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Arrays;
|
||||
@@ -321,7 +323,8 @@ public class LDAPAuthentication
|
||||
eperson.setLastName(context, ldap.ldapSurname);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(ldap.ldapPhone)) {
|
||||
ePersonService.setMetadata(context, eperson, "phone", ldap.ldapPhone);
|
||||
ePersonService.setMetadataSingleValue(context, eperson,
|
||||
MD_PHONE, ldap.ldapPhone, null);
|
||||
}
|
||||
eperson.setNetid(netid.toLowerCase());
|
||||
eperson.setCanLogIn(true);
|
||||
|
Reference in New Issue
Block a user