zend-auth

Updating Zend_Auth_Storage after edit users profile

Hi, 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 ...

Zend Framework: How best to go about retrieving the first name of an authenticated user?

I can get the username by doing this: public function indexAction() { $this->view->username = Zend_Auth::getInstance()->getIdentity(); } "username" is the column in the table that validates the identity. "firstname" is also a column in that table. Does Zend_Auth only store the username? Or is there a way to access other columns fr...

Zend framework common code for all the controllers

I have a login button in the header of the website. This header's html is programmed into Zend framework views/layouts/home.phtml. I have a hidden form in this layout that is triggered by jQuery thickbox inline content display integration. Reason, I dont want to make a ajax call to just fetch a small login form. I create the form us...

Zend_Auth_Adapter using a data mapper

First post here so sorry if I seem like a newb, I am trying to find a way to use Zend_Auth_Adapter with a data mapper, but seem to be struggling. I know I can use Zend_Auth_Adapter_DbTable and associate this with a db table, but this seems to negate the whole reason for having a data mapper (I think)?! Should I be creating a custom adap...

In Zend_Auth, can I get a domain-model User object instead of stdClass?

Hi there, While working on the login part of an application, I find myself running into an issue: My model is based on Active Record, by extending Zend_Db_Table_Row objects. Whenever I have to deal with a user, I'd want to do this through the User object (being an extended table row). However, Zend_Auth_Adapter_DbTable::getResultRowO...

Zend_Auth fails to write to storage

I have yet another weird annoying thing going on with Zend. Basically, I have the following code after creating a user domain: $this->auth = Zend_Auth::getInstance(); $this->view->user = $this->user = $this->auth->getIdentity(); $this->user->idSite = $idSite; $this->user->urlSite = $urlSite; $this->auth->getStorage()->write($this->user...

Zend_Auth login using either username or email as identityColumn

I'm using Zend_Auth with a "Database Table Authentication". What I want to do is allow the user to login with either a username or email address as the "identityColumn". How would I allow both. I'm stuck. ...

How does Zend_Auth storage work?

This is very simple. I write $auth->getStorage()->write($user); And then I want, in a separate process to load this $user, but I can't because $user = $auth->getIdentity(); is empty. Didn't I just... SET it? Why does it not work? Halp? ...

Zend_Auth: not working, getDbSelect() is empty

my authentication fails and when i try to getDbSelect() i get nothing ... what did i do wrong? class AuthController extends Zend_Controller_Action { protected $auth; public function init() { $db = $this->getInvokeArg("bootstrap")->getResource("db"); $this->auth = new Zend_Auth_Adapter_DbTable($db, 'users',...

Zend_Auth checking if user is logged in

i tried using // do login if request is posted if (isset($_POST) } } Zend_Auth::getInstance()->hasIdentity() seem to be always false ... even after a login ...

setting up OpenID authentication using Zend_Auth_Adapter_OpenId

how do i go abt setting up Zend_Auth_Adapter_OpenId ? in the docs: $auth = Zend_Auth::getInstance(); if ((isset($_POST['openid_action']) ... what do all the post do? i guess some is to specify which "part" of the authencation isit. ...

Zend_Auth and Firebird DB

A short question for the PROs. Is it possible to use Zend_Auth_Adapter_DbTable with ZendX_Db_Adapter? I've tried this: $adapter = new Zend_Auth_Adapter_DbTable( Zend_Registry::get('db') ); $adapter->setTableName('USERS') ->setIdentityColumn('username') ->setCredentialColumn('password') ->setIdentity('FOO') ->setCred...

Can (and should?) Zend_Auth return class as the Identity?

I have a class R00_Model_User, which, curiously enough, represents user as he is. Can $result->getIdentity() return me an object of this class? (Or maybe it's stupid?) (There is a factory method in R00_Model_User which prevents from duplicating objects. I'd like Zend_Auth to use it instead of creating a new object, if it can) ...

Zend_Auth: How to check role in addition to username and password?

I want my 'users' table in my database to contain users of all different levels (members, moderators, admins, etc). So a column in my 'users' table is role. I want to be able to check the role to see if they have permission to log in to special parts of the application. How can I do this? Here is my auth adapter so far: protected functi...

Zend_Auth and profile edit

After logging user in I make some operations on his account. After that I want to update his data held bu Zend_Auth. How can I update all data at once, and not one by one which I know how to do it? ...

help with Zend_Auth_Adapter_DbTable

Hi all, I'm starting with the Zend framework and I wanted to use Zend_Auth_Adapter_DbTable to authenticate my users ... I looked at the docs, which seem quite straight forward, but I'm getting an error. Here's my code snippet : $adapter = new Zend_Auth_Adapter_DbTable($this->_dbAdapter, 'users', 'username', 'password', 'MD5(?)'); ...

Zend Framework: How to check an additional column while using DbTable Auth Adapter?

Currently, I'm getting a regular DbTable Auth Adapter: protected function _getAuthAdapter($formData) { $dbAdapter = Zend_Db_Table::getDefaultAdapter(); $authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter); $authAdapter->setTableName('users') ->setIdentityColumn('username') ->setCredentialColumn('passw...

Practical Zend_ACL + Zend_Auth implementation and best practices

Context: My questions pertain to a forum I'm developing pretty much exactly like SO, where there are: guests who have access to view threads but can't reply or vote members who, with enough rep, can edit/vote others threads, and by default they can reply and have the same privileges as guests admins who can pretty much do anything I...

Zend_Auth - Forced to use Zend_DB for quick installation/use?

Hello, i am thinking of using Zend_Auth as the Authentication "mechanism" (component) for a web site. After a quick look a realized that for Database Table Authentication i will also have to use the Zend_Db component. Has anyone tried this approach? Am i forced to use and/or extend/implement the Zend_DB methods/interfaces in order to ha...

Zend Auth With Two Identity Columns

I am using Zend_Auth to validate user credentials and ran into an issue. I need to have a dual column identity. The the two columns are user name and customer identifier. The identityColumn setting and setIdentity() methods don't allow for this scenario. I tried to accomplish this by using the credentialTreatment setting, but when I ...