raise NotImplementedError.new('Only users can be moved.')
end
+ # Handle this once so we don't have to do it in every plugin.
+ if not dst.include?('@') then
+ msg = "the destination user #{dst} is not valid"
+ raise InvalidUserError.new(msg)
+ end
+
begin
src_description = plugin.describe_user(src)
plugin.mv_user(src, dst)
localpart_to = user_to_parts[0]
domain_to = user_to_parts[1]
- if domain_to.nil?
- # There was no "@" in the destination user.
- msg = "the destination user #{user_to} is not valid"
- raise InvalidUserError.new(msg)
- end
-
if not domain_exists(domain_to)
msg = "destination domain #{domain_to} does not exist"
raise NonexistentDomainError.new(msg)