Hi! reviewing code in User model I suggest this change, because if not, the $_JUser instance is null in line 1685 giving error Call to a member function delete() on null
This code should be changed...
if (self::getSuperAdminCountS() <= 1) {
// Prevent deletion of the only Super Admin
//$_u = JUser::getInstance($userId);
$_JUser = JUser::getInstance($userId);
if (in_array(8,$_JUser->groups)) {
vmError('COM_VIRTUEMART_USER_ERR_LASTSUPERADMIN');
$_status = false;
continue;
}
}
To this
$_JUser = JUser::getInstance($userId);
if (self::getSuperAdminCountS() <= 1) {
// Prevent deletion of the only Super Admin
//$_u = JUser::getInstance($userId);
if (in_array(8,$_JUser->groups)) {
vmError('COM_VIRTUEMART_USER_ERR_LASTSUPERADMIN');
$_status = false;
continue;
}
}
Alright, fixed. thank you.