X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=lib%2Fmv%2Fmv_runner.rb;h=ee762e1e70cf4198c1630b3404973d20c75ac264;hp=d2a7c5ba01d4664882a14b9b539f76f1f578d709;hb=1d7d65c9583a879358de36ab1ac26b35a2805ba8;hpb=861e51dd6a409cb41fa6fdac3f49195acccc6541 diff --git a/lib/mv/mv_runner.rb b/lib/mv/mv_runner.rb index d2a7c5b..ee762e1 100644 --- a/lib/mv/mv_runner.rb +++ b/lib/mv/mv_runner.rb @@ -12,6 +12,12 @@ class MvRunner 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)