Skip to content

Commit 354fc4d

Browse files
committed
save UserID to db for instruments
1 parent f321d10 commit 354fc4d

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
@@ -767,6 +767,14 @@ abstract class NDB_BVL_Instrument extends NDB_Page
767767
$this->_saveCandidateAge($values);
768768
}
769769

770+
// Save UserID, the data entry personnel, into flag Data and
771+
// instrument table
772+
$user = \NDB_Factory::singleton()->user();
773+
if (! $user instanceof \LORIS\AnonymousUser) {
774+
// Add UserID to $values
775+
$values['UserID'] = $user->getUsername();
776+
}
777+
770778
//Convert select multiple elements into database storable values
771779
if (!empty($this->selectMultipleElements)) {
772780
foreach ($this->selectMultipleElements AS $elname) {

0 commit comments

Comments
 (0)