Added the ability for admins to delete users. Closes #791

This commit is contained in:
James Brooks
2015-08-06 13:48:23 +01:00
parent 3f7f4e7624
commit 76d3692d9e
4 changed files with 24 additions and 1 deletions

View File

@@ -106,4 +106,19 @@ class TeamController extends Controller
return Redirect::back()
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.edit.success')));
}
/**
* Delete a user.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return \Illuminate\Http\RedirectResponse
*/
public function deleteUser(User $user)
{
$user->delete();
return Redirect::route('dashboard.team')
->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.team.delete.success')));
}
}