desktop-load-locked-desktop is a variable defined in `desktop.el'.
Its value is

Specifies whether the desktop should be loaded if locked.
Possible values are:
t -- load anyway.
nil -- don't load.
ask -- ask the user.
If the value is nil, or `ask' and the user chooses not to load the desktop,
the normal hook `desktop-not-loaded-hook' is run.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 22.2 of Emacs.