cartalyst/sentry — Issue #22: Can't delete users who don't belong to any groups
Author: tabacco
Created: 2011-12-29 05:30:39+00:00
State: open

The code in question:
https://github.com/cartalyst/sentry/blob/master/classes/sentry/user.php#L432

Since Fuel\Core\Database_Query ::execute() returns the number of rows affected, this condition will always fail if the user doesn't belong to any groups, causing the delete transaction to be rolled back.

Would it perhaps be preferable to try and catch a \Database_Exception instead of checking to make sure rows were affected?