## WeBWorK Main Forum

### Re: Login log and LTI

by Nathan Wallach -
Number of replies: 0
I think this is possibly a bug.

I do see log records for LTI logins for students, but apparently not for staff users.

A slightly edited sample is:

The "LOGIN OK" messages are generated by lib/WeBWorK/Authen.pm only when the $self->{initial_login} flag is on. It seems that LTIAdvanced.pm turns it on when "maybe_update_user" (or "create_user") is called, but that only happens if the course/site has "LMSManageUserData" turned on. On my server I do have "$LMSManageUserData=1;" set in webwork2/conf/authen_LTI.conf which explains why I see "LOGIN OK" log records. Can you check if turning that on fixes the issue for your server.
About the lack of records for "staff" account: Since "maybe_update_user" does not attempt to update users of too high a permission, and the line to set the $self->{initial_login} flag is at the end of the block not run for such "power" users - such logins do get the flag turned on, so no log record will be generated. I suspect that both issues should be fixed: the main issue can be fixed by adding a new block after the "elsif ($ce->{LMSManageUserData})" block to turn on \$self->{initial_login} when LMSManageUserData is not on.