split locked user check into separate function call