mouneyrac/auth_googleoauth2 — pull request #12 by vitalyrepin (2012-02-09 13:23:55+00:00)
Title: Prohibit login if email belongs to the prohibited domain

list of allowed e-mail domains (set in the auth params by admin).

Plus removal of trailing whitespaces.

The essential part:

// Prohibit login if email belongs to the prohibited domain
if ($err = email_is_not_allowed($useremail)) {
throw new moodle_exception($err, 'auth_googleoauth2');
}