Example #1
0
 /**
  * Constructor. Only run once for singleton object.
  */
 protected function __construct()
 {
     // XXX: there should be an easier way to do this.
     $user = new User();
     $this->conn = $user->getDatabaseConnection();
     $user->free();
     unset($user);
 }
Example #2
0
function oid_store()
{
    static $store = null;
    if (!$store) {
        # Can't be called statically
        $user = new User();
        $conn = $user->getDatabaseConnection();
        $store = new Auth_OpenID_MySQLStore($conn);
    }
    return $store;
}