Skip to content

Commit a9c1eca

Browse files
committed
save UserID to db for instruments
get change full name to user name Update php/libraries/NDB_BVL_Instrument.class.inc
1 parent 6273c34 commit a9c1eca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

php/libraries/NDB_BVL_Instrument.class.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,14 @@ abstract class NDB_BVL_Instrument extends NDB_Page
744744
$this->_saveCandidateAge($values);
745745
}
746746

747+
// Save UserID, the data entry personnel, into flag Data and
748+
// instrument table
749+
$user = \NDB_Factory::singleton()->user();
750+
if (! $user instanceof \LORIS\AnonymousUser) {
751+
// Add UserID to $values
752+
$values['UserID'] = $user->getUsername();
753+
}
754+
747755
//Convert select multiple elements into database storable values
748756
if (!empty($this->selectMultipleElements)) {
749757
foreach ($this->selectMultipleElements AS $elname) {

0 commit comments

Comments
 (0)