function execute(CommandContext $context) { $manager = ReceiverFactory::getAccessManager(); $user = $context->get('username'); $pass = $context->get('pass'); $user = $manager->login($user, $pass); if (!$user) { $this->context->setError($manager->getError()); return false; } $context->addParam("user", $user); return true; }
function execute(CommandContext $context) { $msgSystem = ReceiverFactory::getMessageSystem(); $email = $context->get('email'); $msg = $context->get('pass'); $topic = $context->get('topic'); $result = $msgSystem->despatch($email, $msg, $topic); if (!$user) { $this->context->setError($msgSystem->getError()); return false; } $context->addParam("user", $user); return true; }