You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the change_user_id script for the case that a user does not have a password.
It is now the case that a user is not required to have a password record
in the database. However, the `change_user_id` script was never updated
for that case. So an exception is thrown if the script is used for a
user that does not have a password record (for example a user created
via LTI authentication).
Note that perltidy has also been run on the file. The script does not
have the `.pl` extension and so the workflow doesn't check this file and
the `run-perltidy.pl` script doesn't attempt to format it. Hide
whitespace changes to see the important change (there is also some clean
up of the comments at the beginning of the file).
Also fix the check for the type of a database record in the `checkArgs`
method of `lib/WeBWorK/DB.pm`. Just because a variable is a `ref` does
not mean that it is an object for which the `isa` method can be called.
The proper check is `blessed $obj && $obj->isa('Package')`. Note the
defined check was unnecessary in any case. This prevented the error in
the script from giving more useful information. Instead it complained
about the inability to call `isa` when it should have given the intended
error message from this check.
0 commit comments