We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30e0495 commit 32b639eCopy full SHA for 32b639e
app/Repositories/UserRepository.php
@@ -151,6 +151,8 @@ public function update($id, array $data)
151
*/
152
public function delete($id)
153
{
154
+ $user = Models\User::findOrFail($id);
155
+
156
if (Models\Server::where('owner_id', $id)->count() > 0) {
157
throw new DisplayException('Cannot delete a user with active servers attached to thier account.');
158
}
@@ -170,7 +172,7 @@ public function delete($id)
170
172
$subuser->delete();
171
173
174
- Models\User::destroy($id);
175
+ $user->delete();
176
DB::commit();
177
} catch (\Exception $ex) {
178
DB::rollBack();
0 commit comments