Skip to content

Instantly share code, notes, and snippets.

View raelshark's full-sized avatar
💭
Not sleeping

Greg Norman raelshark

💭
Not sleeping
View GitHub Profile
@raelshark
raelshark / functions.php
Created August 9, 2019 08:06
Case-Insensitive Gravity Forms Email Comparison
//Make the Gravity Forms email comparison case-insensitive
add_filter( 'gform_field_validation', function ( $result, $value, $form, $field ) {
if ( ! $result['is_valid'] && $field->get_input_type() === 'email' ) {
$email = is_array( $value ) ? rgar( $value, 0 ) : $value;
if ( $field->emailConfirmEnabled && ! empty( $email ) ) {
$confirm = is_array( $value ) ? rgar( $value, 1 ) : $this->get_input_value_submission( 'input_' . $field->id . '_2' );
if ( strcasecmp($confirm,$email) != 0 ) {
echo 'does not match';
$result['is_valid'] = false;
$result['message'] = esc_html__( 'Your emails do not match.', 'gravityforms' );;

Keybase proof

I hereby claim:

  • I am raelshark on github.
  • I am raelshark (https://keybase.io/raelshark) on keybase.
  • I have a public key ASDjIRrJ-pRrBNkhz_nIPA2Tm6ZeA8mHi82cNQttwOjLNAo

To claim this, I am signing this object:

@raelshark
raelshark / tweet_dumper.py
Created August 16, 2016 20:57 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""