HI,

In relation to your answer:

*Hi,
Thanks for your time and consideration. I appreciate it.
Can you pleae explain more about below*
*If you want use twice Zend\Authentication\**AuthenticationService, look in
Zend\Authentication\Storage\**Session, you'll see in __construct, there's
an namespace parameter, change it for "Zend_Auth_Frontend" (in front) and
"Zend_Auth_Backend" obiviously for the back.
*
*I am trying to do this but not getting exactly what to do?*



You should test something like this.

use Zend\Authentication\AuthenticationService,
    Zend\Authentication\Adapter,
    Zend\Authentication\Storage;

//backend
$backend_auth_adapter = new Adapter\DbTable($this->getAdapter());
$backend_auth_adapter->setTableName('admin_user');
$backend_auth_adapter->setIdentityColumn('login');
$backend_auth_adapter->setCredentialColumn('password');
$backend_auth_adapter->setIdentity($login);
$backend_auth_adapter->setCredential($password);

$backend_auth = new AuthenticationService(new
Storage\Session('Zend_Auth_Backend'));
 $result = $backend_auth->authenticate($backend_auth_adapter);
var_dump($result);

//Frontend
$frontend_auth_adapter = new Adapter\DbTable($this->getAdapter());
$frontend_auth_adapter->setTableName('user');
$frontend_auth_adapter->setIdentityColumn('login');
$frontend_auth_adapter->setCredentialColumn('password');
$frontend_auth_adapter->setIdentity($login);
$frontend_auth_adapter->setCredential($password);

 $frontend_auth = new AuthenticationService(new
Storage\Session('Zend_Auth_Frontend'));
 $result = $frontend_auth->authenticate($frontend_auth_adapter);
var_dump($result);

Cf;
https://github.com/zendframework/zf2/blob/master/library/Zend/Authentication/AuthenticationService.php//
Constructor and setStorage
https://github.com/zendframework/zf2/blob/master/library/Zend/Authentication/Storage/Session.php//Constructor

Have fun

2013/2/7 Pierre Rambaud <pierre.ramb...@instantluxe.com>

> I only tried GotCms with Debian Wheezy and I know this is not a powerfull
> installation but if you can find something wrong I'll be happy to fix it ;)
> If you want use twice Zend\Authentication\AuthenticationService, look in
> Zend\Authentication\Storage\Session, you'll see in __construct, there's an
> namespace parameter, change it for "Zend_Auth_Frontend" (in front) and
> "Zend_Auth_Backend" obiviously for the back.
>
> Regards,
>
> 2013/2/7 vasimahmad <vasim.ah...@sunarctechnologies.com>
>
> > Thanks, It seems to be good stuff with gotCMS
> >
> > I Tried with GotCMS but found some issues in installations say it have
> > completed installation steps successfully but database is not updated.
> >
> > However I tried at myend and now I am able to make admin controller/views
> > in
> > module directory itself and also understood routing concepts.
> >
> > Used ZfcAdmin module and routed admin controlloer/views to ZfcAdmin
> module.
> > This seems to me simpler at this time. (but I want to check why GotCMS
> not
> > worked properly for me)
> >
> > Still looking for how to create separaete admin and front user login and
> > session. Any inputs for this please.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://zend-framework-community.634137.n4.nabble.com/Zend-framework-2-application-structure-for-admin-and-front-end-modules-tp4659033p4659064.html
> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >
> > --
> > List: fw-general@lists.zend.com
> > Info: http://framework.zend.com/archives
> > Unsubscribe: fw-general-unsubscr...@lists.zend.com
> >
> >
> >
>
>
> --
> Pierre RAMBAUD - I N S T A N T  |  L U X E - 40 rue d'Aboukir - 75002 Paris
> - France
> Web : www.instantluxe.com
>



-- 
Pierre Rambaud
Website: http://rambaudpierre.fr
G+: https://plus.google.com/u/0/107809758756474139920/posts
Github: https://github.com/PierreRambaud

Reply via email to