Example #1
0
function user_GetByMail($mail, $query_suffix = ";")
{
    $ret = db_QueryFetchFirst("SELECT id,node,mail," . DB_FIELD_DATE('created') . ",hash,HEX(secret) AS secret,auth_key," . DB_FIELD_DATE('last_auth') . "\n\t\tFROM " . SH_TABLE_PREFIX . SH_TABLE_USER . " \n\t\tWHERE mail=?\n\t\tLIMIT 1" . $query_suffix, $mail);
    return db_ParseRow($ret, _SH_USER_ROW_MAP);
}
Example #2
0
function legacy_GetUserWithInfo($id)
{
    return db_QueryFetchFirst("SELECT id," . MYSQL_ISO_FORMAT('timestamp') . ",hash,bonus_votes,num_events,gravatar\n\t\tFROM " . CMW_TABLE_LEGACY_USER . " WHERE id=? LIMIT 1;", $id);
}
Example #3
0
function theme_GetRandom($node)
{
    $threshold = _THEME_HACK_THRESHOLD;
    // TODO: Get Threshold from metadata (populate it any time 'theme score' is called)
    return db_QueryFetchFirst("SELECT id,theme FROM " . CMW_TABLE_THEME_IDEA . " \n\t\tWHERE node=? AND parent=0 AND score>=?\n\t\tORDER BY rand() LIMIT 1", $node, $threshold);
}