concrete/src/User/ValidationHash.php
public static function add($uID, $type, $singeHashAllowed = false, $hashLength = 64)
    {
        self::removeExpired($type);
        $hash = self::generate($hashLength);
        $db = Database::connection();
        if ($singeHashAllowed) {
            $db->executeQuery("DELETE FROM UserValidationHashes WHERE uID = ? AND type = ?", array($uID, $type));
        }
        $db->executeQuery("insert into UserValidationHashes (uID, uHash, uDateGenerated, type) values (?, ?, ?, ?)", array($uID, $hash, time(), intval($type)));

        return $hash;
    }
public static function add($uID, $type, $singeHashAllowed = false, $hashLength = 64)
    {
        self::removeExpired($type);
        $hash = self::generate($hashLength);
        $db = Database::connection();
        if ($singeHashAllowed) {
            $db->executeQuery("DELETE FROM UserValidationHashes WHERE uID = ? AND type = ?", array($uID, $type));
        }
        $db->executeQuery("insert into UserValidationHashes (uID, uHash, uDateGenerated, type) values (?, ?, ?, ?)", array($uID, $hash, time(), intval($type)));

        return $hash;
    }
public static function add ( $ uID , $ type , $ singeHashAllowed = false , $ hashLength = 64 ) { self :: removeExpired ( $ type ) ; $ hash = self :: generate ( $ hashLength ) ; $ db = Database :: connection ( ) ; if ( $ singeHashAllowed ) { $ db -> executeQuery ( "DELETE FROM UserValidationHashes WHERE uID = ? AND type = ?" , array ( $ uID , $ type ) ) ; } $ db -> executeQuery ( "insert into UserValidationHashes (uID, uHash, uDateGenerated, type) values (?, ?, ?, ?)" , array ( $ uID , $ hash , time ( ) , intval ( $ type ) ) ) ; return $ hash ; }
Adds a hash to the lookup table for a user and type, removes any other existing hashes for the same user and type.

@param int $uID
@param int $type
@param bool $singeHashAllowed
@param int $hashLength

@return string
Adds a hash to the lookup table for a user and type removes any other existing hashes for the same user and type .