diff --git a/autoassignrole.module b/autoassignrole.module index 29cefb2..c7f265d 100644 --- a/autoassignrole.module +++ b/autoassignrole.module @@ -360,7 +360,7 @@ function _autoassignrole_get_auto_roles() { * Implements hook_user_role_presave(). */ function autoassignrole_user_role_presave($role) { - if ($role->rid) { + if (!empty($role->rid)) { // We store the existing role name to be used later. $role->existing_name = db_query("SELECT name FROM {role} WHERE rid = :rid", array(':rid' => $role->rid))->fetchField(); }