File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,16 @@ protected function configure() {
8787 }
8888
8989 protected function execute (InputInterface $ input , OutputInterface $ output ): int {
90+
91+ /**
92+ * Check if source and destination users are same. If they are same then just ignore the transfer.
93+ */
94+
95+ if ($ input ->getArgument (('source-user ' )) === $ input ->getArgument ('destination-user ' )) {
96+ $ output ->writeln ("<error>Ownership can't be transferred when Source and Destination users are the same user. Please check your input.</error> " );
97+ return 1 ;
98+ }
99+
90100 $ sourceUserObject = $ this ->userManager ->get ($ input ->getArgument ('source-user ' ));
91101 $ destinationUserObject = $ this ->userManager ->get ($ input ->getArgument ('destination-user ' ));
92102
You can’t perform that action at this time.
0 commit comments