Merge branch 'develop' into feature/PTDL-472
This commit is contained in:
commit
b7b046c044
24 changed files with 672 additions and 82 deletions
|
@ -151,6 +151,8 @@ class old_UserRepository
|
|||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
$user = Models\User::findOrFail($id);
|
||||
|
||||
if (Models\Server::where('owner_id', $id)->count() > 0) {
|
||||
throw new DisplayException('Cannot delete a user with active servers attached to thier account.');
|
||||
}
|
||||
|
@ -170,7 +172,7 @@ class old_UserRepository
|
|||
$subuser->delete();
|
||||
}
|
||||
|
||||
Models\User::destroy($id);
|
||||
$user->delete();
|
||||
DB::commit();
|
||||
} catch (\Exception $ex) {
|
||||
DB::rollBack();
|
||||
|
|
Reference in a new issue