if ($old_owner !== $new_owner && !empty($new_owner)) {
if ($old_owner != Horde_Auth::getAuth() && !Horde_Auth::isAdmin()) {
$notification->push(_("Only the owner or system administrator may change ownership or owner permissions for a share"), 'horde.error');
+ } elseif ($auth->hasCapability('list') && !$auth->exists($new_owner)) {
+ $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::removeHook($new_owner)), 'horde.error');
} else {
$share->set('owner', $new_owner);
$share->save();
if (empty($user) || $user == $new_owner) {
continue;
}
+ if ($auth->hasCapability('list') && !$auth->exists($user)) {
+ $notification->push(sprintf(_("The user \"%s\" does not exist."), Auth::removeHook($user)), 'horde.error');
+ continue;
+ }
if (!empty($u_show[$key])) {
$perm->addUserPermission($user, PERMS_SHOW, false);