Using ZfcUser across modules/views

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Using ZfcUser across modules/views

Mike A
Slowly getting back into ZF2 after months off with family.

In a test project with the primary Application module and SecondModule,
I've installed ZfcUser and now want to display the logged-in user in
SecondModule views. Is there a helpful tutorial that shows how to do
this? I can get ZfcUser to work in the /user context but not across pages.

TIA...

Mike A.

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Zend\Db\Adapter\Adapter - set character set to utf8

saiman
Hi all,
I was trying to set the connection character set to utf8 in following
way (code bellow) without success:

$adapter = new Adapter(array(
    'driver' => 'Pdo_Mysql',
    'database' => 'test',
    'username' => 'root',
    'password' => 'mypass',
    'charset ' => 'utf8',
));

Finally I did that bellow to get this working:

$adapter = new Adapter(array(
    'driver' => 'Pdo_Mysql',
    'database' => 'test',
    'username' => 'root',
    'password' => 'mypass',
));
$connection = $adapter->getDriver()->getConnection();
$connection->execute('SET NAMES utf8');

It should work with first example, any idea why it doesn't? What's wrong?