usernames passed to maintenance/protect.php via --user or -u are ignored and replaced by default "maintenance script". same for --reason and -r (which is always left empty)
fix:
in public function execute() change
44 $userName = $this->getOption( 'u', 'Maintenance script' );
45 $reason = $this->getOption( 'r', '' );
to
44 $userName = $this->getOption( 'user', 'Maintenance script' );
45 $reason = $this->getOption( 'reason', '' );