zend-auth

Updating Zend_Auth_Storage after edit users profile

痞子三分冷 提交于 2019-12-06 07:39:23
问题 I have following situation: I have loged user, standard authentication with DB table $authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter()); $authAdapter->setTableName('users'); $authAdapter->setIdentityColumn('user_name'); $authAdapter->setCredentialColumn('password'); When user edits his profile, I save it into Db, but I need to update also storage (using standard Zend_Auth_Storage_Session). Is there any easy way how to do it? Many thanks. 回答1: Your best bet would

Is there any way to force authentication with Zend_Auth?

时光毁灭记忆、已成空白 提交于 2019-12-06 07:24:40
I am working with Zend_Auth and cookie/session persistence. I can't seem to figure out how to force an authentication with this class. Is there any way to force Zend_Auth to believe it has authenticated as a user? Zend_Auth::getInstance()->getStorage()->write($identity); Where $identity would contain the same type of structure/data that's generated when the user logs in through the standard mechanism. For instance, given this sample code in the login action: $adapter = $this->getAuthAdapter($form->getValues()); $auth = Zend_Auth::getInstance(); $result = $auth->authenticate($adapter); if (

Updating Zend_Auth_Storage after edit users profile

允我心安 提交于 2019-12-04 14:36:10
I have following situation: I have loged user, standard authentication with DB table $authAdapter = new Zend_Auth_Adapter_DbTable(Zend_Db_Table::getDefaultAdapter()); $authAdapter->setTableName('users'); $authAdapter->setIdentityColumn('user_name'); $authAdapter->setCredentialColumn('password'); When user edits his profile, I save it into Db, but I need to update also storage (using standard Zend_Auth_Storage_Session). Is there any easy way how to do it? Many thanks. Your best bet would be to not use Zend_Auth's storage to hold information that's likely to change - by default it only holds the

Zend_Auth: Allow user to be logged in to multiple tables/identities

无人久伴 提交于 2019-12-04 09:25:35
问题 I am using Zend_Auth for authentication in a web portal. A normal mySQL "users" table with a login and password column gets queried against, and a user logged in. However, I have two additional groups of users that I want to authenticate. All three of these user groups have their logon data in other tables . Their data is coming from external sources, so unifying these login accounts into one is not desired. So it could be that a user is an authenticated user from any of the three groups,

Zend_Session / Zend_Auth randomly throws Error Message ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13)

这一生的挚爱 提交于 2019-11-30 06:24:38
I'm currently working on a new Application using (among other things) Zend_Auth but, for whatever reason, this Error Message is showing up at any location totally randomly (or so it seams) Zend_Session::start() - /home/hannes/workspace/develop/library/Zend/Session.php(Line:480): Error #8 session_start() [function.session-start]: ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) Array #0 /home/hannes/workspace/develop/library/Zend/Session/Namespace.php(143): Zend_Session::start(true) #1 /home/hannes/workspace/develop/library/Zend/Auth/Storage/Session.php(87): Zend

Does Zend ACL suit my needs?

人盡茶涼 提交于 2019-11-30 02:24:00
I have based my application upon the Zend Framework. I am using Zend_Auth for authentication, but I'm not sure if Zend_Acl will work for me because, frankly, the examples I've seen are either too simplistic for my needs or confuse me. I'm thinking of elements in my application as Resources and these Resources can have have Privileges. Roles containing Resource Privileges are dynamically defined assigned to users. I'm storing this information in normalized tables. Users have a Role A Role can have multiple Resources Resources can have multiple Privileges Roles are really just collections of

“session has already been started…” exception in Zend Framework application

人走茶凉 提交于 2019-11-29 12:46:10
问题 I get this error when trying to load a Zend Framework application: Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()' in /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php:462 Stack trace: #0 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session/Namespace.php(143): Zend_Session::start(true) #1 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth/Storage/Session.php(87):

Does Zend ACL suit my needs?

牧云@^-^@ 提交于 2019-11-28 23:17:50
问题 I have based my application upon the Zend Framework. I am using Zend_Auth for authentication, but I'm not sure if Zend_Acl will work for me because, frankly, the examples I've seen are either too simplistic for my needs or confuse me. I'm thinking of elements in my application as Resources and these Resources can have have Privileges. Roles containing Resource Privileges are dynamically defined assigned to users. I'm storing this information in normalized tables. Users have a Role A Role can

Cross framework authentication zend + codeigniter

扶醉桌前 提交于 2019-11-28 12:02:07
问题 Zend_Auth uses PHP Session but, codeigniter has a different approach altogether. The project that I am working on requires that anyone who hasIdentity() in zend, when logs into another system which uses codeigniter, should not have issues to browse around. How do I set Codeigniter session when I authenticate the user on zend system and next step is - vice-versa. Thanks in Advance. EDIT: Both the sites are using different database but, users are indexed together. 回答1: A quick workaround is to

Duplicate DB sessions created upon Zend_Auth login

本秂侑毒 提交于 2019-11-28 11:29:46
问题 I must be doing something wrong. I can't seem to find the answer to my problem anywhere on the Web, and this generally means that the solution is so simple that no one needs an answer on it. I am using a database to store my session. I set it up in my bootstrap like this: protected function _initDBSessions(){ $resource = $this->getPluginResource('db'); //from config.ini? $db = $resource->getOptions(); $adapter = new Zend_Db_Adapter_Pdo_Mysql($db["params"]); Zend_Db_Table_Abstract: