public static function keyIsValid( $key )
	{
		$key = C4gActivationkeyModel::findOneBy( 'activationkey', hash('sha256', $key) );
		// the key exists, is not already claimed and is not expired
		return (!empty( $key ) && empty( $key->used_by ) && ($key->expiration_date == 0 || $key->expiration_date > time()));
	}
public static function keyIsValid( $key )
	{
		$key = C4gActivationkeyModel::findOneBy( 'activationkey', hash('sha256', $key) );
		// the key exists, is not already claimed and is not expired
		return (!empty( $key ) && empty( $key->used_by ) && ($key->expiration_date == 0 || $key->expiration_date > time()));
	}
public static function keyIsValid ( $ key ) { $ key = C4gActivationkeyModel :: findOneBy ( 'activationkey' , hash ( 'sha256' , $ key ) ) ; // the key exists, is not already claimed and is not expired return ( ! empty ( $ key ) && empty ( $ key -> used_by ) && ( $ key -> expiration_date == 0 || $ key -> expiration_date > time ( ) ) ) ; }
returns the action connected to the given key
@param  string $key
@return string
returns the action connected to the given key