public function setGender($gender)
    {
        $gender = strtolower($gender);

        if ($gender != '' && $gender != 'male' && $gender != 'female') {
            throw new OAuth2Exception('Gender can be either "male" or "female", you tried to set it to "' . $gender . '".');
        }

        $this->gender = $gender;
    }