Thx Random and others.
I implemented the way Random did. One of my pet peavs on lists are the
lovely people that instead of being kind reply with
"You should checkout Nabble it has a search feature"
So I thank the nice guys/gals for the open dialog.
Eric
vRandom wrote:
>
> I did something like this to merge two tables into one, using the
> Zend_Auth.
>
> $this->auth = Zend_Auth::getInstance();
> $authAdapter = new Zend_Auth_Adapter_DbTable($this->db);
> $authAdapter->setTableName('users');
> $authAdapter->setIdentityColumn('username');
> $authAdapter->setCredentialColumn('password');
> $authAdapter->setCredentialTreatment('md5(?)');
> // Set the input credential values to authenticate against
> $authAdapter->setIdentity($params['username']);
> $authAdapter->setCredential($params['password']);
> // try and authenticate the user
> $result = $this->auth->authenticate($authAdapter);
> if ($result->isValid()) {
> // success
> $data = $authAdapter->getResultRowObject();
> // returns object array, id, username, password, aclgroup
> // get this users details
> $dat = getUserData($data->id);
> // returns db array, first name, last name, e-mail, subscription exp date,
> last online, tracking token, etc
> // merge data from Auth object
> $dat['username'] = $data->username;
> $dat['aclgroup'] = $data->accessgroup;
> // save modified auth data
> $this->auth->getStorage()->write((object) $dat );
> } else {
> // invalid login, show error
> }
>
--
View this message in context:
http://www.nabble.com/Zend_Auth-and-a-Join---tp21471820p21492703.html
Sent from the Zend Framework mailing list archive at Nabble.com.