Skip to content

Commit f431f56

Browse files
committed
Fix failed tests
1 parent 4a450e0 commit f431f56

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/sprinkles/admin/src/Controller/UserController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ public function getModalConfirmDelete(Request $request, Response $response, $arg
523523
// Check that we are not deleting the master account
524524
// Need to use loose comparison for now, because some DBs return `id` as a string
525525
if ($user->id == $config['reserved_user_ids.master']) {
526+
$e = new BadRequestException();
526527
$e->addUserMessage('DELETE_MASTER');
527528

528529
throw $e;
@@ -1433,7 +1434,7 @@ protected function getUserFromParams($params)
14331434
$classMapper = $this->ci->classMapper;
14341435

14351436
// Get the user to delete
1436-
$user = $classMapper->getClassMapping('User')
1437+
$user = $classMapper->getClassMapping('user')
14371438
::where('user_name', $data['user_name'])
14381439
->first();
14391440

0 commit comments

Comments
 (0)