diff --git a/app/Http/Controllers/GroupsController.php b/app/Http/Controllers/GroupsController.php index 7f7781faf6..39ed99b3d8 100755 --- a/app/Http/Controllers/GroupsController.php +++ b/app/Http/Controllers/GroupsController.php @@ -116,16 +116,14 @@ class GroupsController extends Controller $group->permissions = json_encode(Input::get('permission')); - if (!config('app.lock_passwords')) { - - if ($group->save()) { - return redirect()->to("admin/groups")->with('success', trans('admin/groups/message.success.update')); - } - return redirect()->back()->withInput()->withErrors($group->getErrors()); - - } else { + if (config('app.lock_passwords')) { return redirect()->route('update/group', $id)->withInput()->with('error', 'Denied! Editing groups is not allowed in the demo.'); } + if ($group->save()) { + return redirect()->to("admin/groups")->with('success', trans('admin/groups/message.success.update')); + } + return redirect()->back()->withInput()->withErrors($group->getErrors()); + }