{"action":"created","issue":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/2231","repository_url":"https://api.github.com/repos/snipe/snipe-it","labels_url":"https://api.github.com/repos/snipe/snipe-it/issues/2231/labels{/name}","comments_url":"https://api.github.com/repos/snipe/snipe-it/issues/2231/comments","events_url":"https://api.github.com/repos/snipe/snipe-it/issues/2231/events","html_url":"https://github.com/snipe/snipe-it/issues/2231","id":164390642,"number":2231,"title":"Undefined variable: settings when adding user with an existing username","user":{"login":"emilysnothere","id":6569484,"avatar_url":"https://avatars.githubusercontent.com/u/6569484?v=3","gravatar_id":"","url":"https://api.github.com/users/emilysnothere","html_url":"https://github.com/emilysnothere","followers_url":"https://api.github.com/users/emilysnothere/followers","following_url":"https://api.github.com/users/emilysnothere/following{/other_user}","gists_url":"https://api.github.com/users/emilysnothere/gists{/gist_id}","starred_url":"https://api.github.com/users/emilysnothere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emilysnothere/subscriptions","organizations_url":"https://api.github.com/users/emilysnothere/orgs","repos_url":"https://api.github.com/users/emilysnothere/repos","events_url":"https://api.github.com/users/emilysnothere/events{/privacy}","received_events_url":"https://api.github.com/users/emilysnothere/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-07-07T19:40:40Z","updated_at":"2016-07-07T19:54:56Z","closed_at":null,"body":"#### Expected Behavior (or desired behavior if a feature request)\r\nWhen I add a user with an existing username, I expect an error message to appear at the top of the page saying \"Username already exists\"\r\n\r\n-----\r\n\r\n#### Actual Behavior\r\n\r\nWhen I try to add the user, I'm shown a \"woops something went wrong\" error page. Enabling debugging shows me the following error:\r\nErrorException in UsersController.php line 133:\r\nUndefined variable: settings\r\n\r\n-----\r\n\r\n#### Please confirm you have done the following before posting your bug report:\r\n\r\n- [x] I have enabled debug mode\r\n- [x] I have read [checked the Common Issues page](http://docs.snipeitapp.com/common-issues.html)\r\n\r\n-----\r\n#### Please provide answers to these questions before posting your bug report:\r\n\r\n- Version of Snipe-IT you're running: **v3.0.0-beta**\r\n- What OS and web server you're running Snipe-IT on: **Linux**\r\n- What method you used to install Snipe-IT (install.sh, manual installation, docker, etc): **manual installation**\r\n- If you're getting an error in your browser, include that error: **Failed to load resource: the server responded with a status of 500 (Internal Server Error)**\r\n- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error: **Add new user -> click on save button**\r\n- If a stacktrace is provided in the error, include that too: **Below**\r\n- Confirm whether the error is [reproduceable on the demo](https://snipeitapp.com/demo): **No**\r\n- Include what you've done so far in the installation, and if you got any error messages along the way: **Modified settings, reset passwords, added company, added locations. Some errors I was able to fix (i.e. incorrect email credentials and missing GD library)**\r\n- Indicate whether or not you've manually edited any data directly in the database: **No**\r\n\r\n```\r\nErrorException in UsersController.php line 133:\r\nUndefined variable: settings\r\nin UsersController.php line 133\r\nat HandleExceptions->handleError('8', 'Undefined variable: settings', 'MYHOST/app/Http/Controllers/UsersController.php', '133', array('request' => object(Request), 'user' => object(User), 'data' => array('first_name' => 'FNAME', 'email' => 'email@email.com', 'username' => 'USERNAME', 'password' => 'PASSWORD'))) in UsersController.php line 133\r\nat UsersController->postCreate(object(Request))\r\nat call_user_func_array(array(object(UsersController), 'postCreate'), array(object(Request))) in Controller.php line 80\r\nat Controller->callAction('postCreate', array(object(Request))) in ControllerDispatcher.php line 146\r\nat ControllerDispatcher->call(object(UsersController), object(Route), 'postCreate') in ControllerDispatcher.php line 94\r\nat ControllerDispatcher->Illuminate\\Routing\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 52\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 103\r\nat Pipeline->then(object(Closure)) in ControllerDispatcher.php line 96\r\nat ControllerDispatcher->callWithinStack(object(UsersController), object(Route), object(Request), 'postCreate') in ControllerDispatcher.php line 54\r\nat ControllerDispatcher->dispatch(object(Route), object(Request), 'App\\Http\\Controllers\\UsersController', 'postCreate') in Route.php line 174\r\nat Route->runController(object(Request)) in Route.php line 140\r\nat Route->run(object(Request)) in Router.php line 724\r\nat Router->Illuminate\\Routing\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 52\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in Authenticate.php line 45\r\nat Authenticate->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in CheckLocale.php line 40\r\nat CheckLocale->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(CheckLocale), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in VerifyCsrfToken.php line 64\r\nat VerifyCsrfToken->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 37\r\nat AddQueuedCookiesToResponse->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in EncryptCookies.php line 59\r\nat EncryptCookies->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 103\r\nat Pipeline->then(object(Closure)) in Router.php line 726\r\nat Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 699\r\nat Router->dispatchToRoute(object(Request)) in Router.php line 675\r\nat Router->dispatch(object(Request)) in Kernel.php line 246\r\nat Kernel->Illuminate\\Foundation\\Http\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 52\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in Debugbar.php line 49\r\nat Debugbar->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(Debugbar), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in CheckForSetup.php line 22\r\nat CheckForSetup->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(CheckForSetup), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in NosniffGuard.php line 17\r\nat NosniffGuard->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(NosniffGuard), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in XssProtectHeader.php line 17\r\nat XssProtectHeader->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(XssProtectHeader), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in FrameGuard.php line 17\r\nat FrameGuard->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(FrameGuard), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in ShareErrorsFromSession.php line 49\r\nat ShareErrorsFromSession->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in StartSession.php line 62\r\nat StartSession->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44\r\nat CheckForMaintenanceMode->handle(object(Request), object(Closure))\r\nat call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136\r\nat Pipeline->Illuminate\\Pipeline\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 32\r\nat Pipeline->Illuminate\\Routing\\{closure}(object(Request))\r\nat call_user_func(object(Closure), object(Request)) in Pipeline.php line 103\r\nat Pipeline->then(object(Closure)) in Kernel.php line 132\r\nat Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99\r\nat Kernel->handle(object(Request)) in index.php line 55```"},"comment":{"url":"https://api.github.com/repos/snipe/snipe-it/issues/comments/231188670","html_url":"https://github.com/snipe/snipe-it/issues/2231#issuecomment-231188670","issue_url":"https://api.github.com/repos/snipe/snipe-it/issues/2231","id":231188670,"user":{"login":"snipe","id":197404,"avatar_url":"https://avatars.githubusercontent.com/u/197404?v=3","gravatar_id":"","url":"https://api.github.com/users/snipe","html_url":"https://github.com/snipe","followers_url":"https://api.github.com/users/snipe/followers","following_url":"https://api.github.com/users/snipe/following{/other_user}","gists_url":"https://api.github.com/users/snipe/gists{/gist_id}","starred_url":"https://api.github.com/users/snipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snipe/subscriptions","organizations_url":"https://api.github.com/users/snipe/orgs","repos_url":"https://api.github.com/users/snipe/repos","events_url":"https://api.github.com/users/snipe/events{/privacy}","received_events_url":"https://api.github.com/users/snipe/received_events","type":"User","site_admin":false},"created_at":"2016-07-07T19:54:56Z","updated_at":"2016-07-07T19:54:56Z","body":"When did you download this? I don't see anything like that in UsersController.php"}}
{"actor":{"display_login":"snipe"}}