I have a form comment. I want to get the user ID from Zend_Auth
to insert into my database. How can I do it?
Asked
Active
Viewed 3,228 times
1

Eitan T
- 32,660
- 14
- 72
- 109

Vuong Tran
- 31
- 1
- 5
1 Answers
3
If Zend_Auth
has been instantiated, then:
Get an instance of it:
$auth = Zend_Auth::getInstance();
Get the identity you must have stored on authentication success:
$identity = $auth->getIdentity();
Use the identity according to the model of what you stored.

Eitan T
- 32,660
- 14
- 72
- 109

burntblark
- 1,680
- 1
- 15
- 25