TEST CODE
$user = 'admin';
$password = 'password ';
function newAdministrator($name, $valid=1) {
$user = new Zenphoto_Administrator($name, $valid);
return $user;
}
function getAnAdmin($criteria) {
$selector = array();
foreach ($criteria as $match=>$value) {
if (is_numeric($value)) {
$selector[] = $match.$value;
} else {
$selector[] = $match.db_quote($value);
}
}
$sql = 'SELECT * FROM '.prefix('administrators').' WHERE '.implode(' AND ',$selector).' LIMIT 1';
$admin = query_single_row($sql,false);
if ($admin) {
return newAdministrator($admin['user'], $admin['valid']);
} else {
return NULL;
}
}
$hash = $_zp_authority->passwordHash($user, $password);
$userobj = $_zp_authority->getAnAdmin(array('user=' => $user, 'pass=' => $hash, 'valid=' => 1));
echo 'Current User Object: '.$userobj.'';
$hashcheck = getAnAdmin(array('user=' => $user, 'valid=' => 1));
echo ("check hash: ".$userobj->get('passhash')).'';
$hash_type = getOption('strong_hash');
echo ("Hashtype: " .$hash_type).'';
Fatal error: Call to a member function get() on a non-object in /public_html/philbertphotos.com/signature/themes/ZenSignature/image.php on line 47