2

I'm using Zend Framework 2 and I've installed the module ZfcUser.

Everything was working correctly until I've decided to add a second db adapter in my config/autoload/global.php

<?php
return array(
  'db' => array(
    'adapters' => array(
      'cleardb' => array(
        'driver'         => 'Pdo',
        'dsn'            => 'mysql:dbname=secret;host=secret.com',
        'driver_options' => array(
          ...
        ),
      ),
      'other' => array(...)
    )
  ),
  'service_manager' => array(
    'abstract_factories' => array(
      'Zend\Db\Adapter\AdapterAbstract'
      => 'Zend\Db\Adapter\AdapterAbstractServiceFactory',
    ),
  ),
);

Now, ZfcUser can't find my default db adapter.

In the zfcuser.global.php I've updated this line:

'zend_db_adapter' => 'cleardb'

This is the error I get when I try to login:

An alias "zfcuser_zend_db_adapter" was requested but no service could be found.

Your help is really appreciated.

Cyril F
  • 1,842
  • 2
  • 19
  • 35
  • Maybe it should be 'zend_db_adapter' => 'Zend\Db\Adapter\AdapterAbstract' in your zfcuser.global.php? – asologor Dec 12 '14 at 00:15

0 Answers0