Navigatore:   Home arrow Zend Controller - Note arrow zend autentication on Vbulletin
Menu principale
Home
Credits
Zend Controller - Note
Notizie
Credits
Music Sense
RED5
Iped
- - - - - - -Mix
Il Tuo IP
Parole crociate - At Cross
1000 Games
Chi e' online
Abbiamo 11 visitatori online
-

zend autentication on Vbulletin Stampa E-mail

Image


 Esempio per la realizazione l'autenticazione tramite la classe auth Zend Framework Zend_Auth_Adapter_DbTable usando la tabella utenti di Vbullettin

Vbulletin per la generazione della password md5 usa la sintassi:


md5
(md5($password)."$salt")

dove $salt corrisponde al contenuto del campo salt della tabella utenti di v bulletin, in zend framework ottiamo lo stesso risultato con:

MD5(CONCAT(MD5(?), salt)

di seguito l'esempio completo con la sintassi di Zend

An example to have autantication by Zend Framework Auth  Class Zend_Auth_Adapter_DbTable  using  Vbullettin user table

Vbulletin to generate md5 password use:


md5
(md5($password)."$salt")

where $salt is the content of 'salt' field of   v bulletin user table, in zend framework we have the same result using:

MD5(CONCAT(MD5(?), salt)

above the complete example with Zend syntact

 

$db = Zend_Registry::get('db');
    $my_auth_adapter = new Zend_Auth_Adapter_DbTable($db, 'forumuser', 'username', 'password','MD5(CONCAT(MD5(?), salt))');
    $my_auth_adapter->setIdentity($username)->setCredential($password);

            $result = $my_auth_adapter->authenticate();
   

 
< Prec.   Pros. >