/framework/experimental/auth/AuthStorageHandlerDb.php

http://zoop.googlecode.com/ · PHP · 23 lines · 20 code · 3 blank · 0 comment · 0 complexity · 2f4d4163795d67a2e4d7ae3375ea7805 MD5 · raw file

  1. <?php
  2. class AuthDbStorageDb implements AuthStorageHandler
  3. {
  4. private $info;
  5. function __construct($dbInfo)
  6. {
  7. $this->info = $dbInfo;
  8. }
  9. public function getInfo($username)
  10. {
  11. return SqlFetchRow('select ' . $this->info['username'] . ' as username, ' . $this->info['password'] . ' as password, ' .
  12. $this->info['nonce'] . ' as nonce, ' . $this->info['password_type'] . ' as password_type from ' .
  13. $this->info['table'] . ' where ' . $this->info['username'] . ' = :username',
  14. array('username' => $username));
  15. }
  16. public function setInfo($username, $info)
  17. {
  18. trigger_error('net yet implemented');
  19. }
  20. }