public function SmsEventSubscriber::createAccount in SMS Framework 2.1.x
Same name and namespace in other branches
- 8 modules/sms_user/src/EventSubscriber/SmsEventSubscriber.php \Drupal\sms_user\EventSubscriber\SmsEventSubscriber::createAccount()
- 2.x modules/sms_user/src/EventSubscriber/SmsEventSubscriber.php \Drupal\sms_user\EventSubscriber\SmsEventSubscriber::createAccount()
Process an incoming SMS to see if a new account should be created.
Parameters
\Drupal\sms\Event\SmsMessageEvent $event: The event.
File
- modules/
sms_user/ src/ EventSubscriber/ SmsEventSubscriber.php, line 40
Class
- SmsEventSubscriber
- Event subscriber responding to SMS Framework events.
Namespace
Drupal\sms_user\EventSubscriberCode
public function createAccount(SmsMessageEvent $event) {
foreach ($event
->getMessages() as $sms_message) {
$this->accountRegistration
->createAccount($sms_message);
}
}