Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function authenticate(&$ps_username, $ps_password="", $pa_options="") {
- //return 2;
- require_once('/var/aegir/simplesamlphp/lib/_autoload.php');
- $as = new SimpleSAML_Auth_Simple('colibreo-ca2-sp');
- $as->requireAuth();
- if ($as->isAuthenticated()) {
- $attributes = $as->getAttributes();
- if (is_array($attributes["user_name"]) && count($attributes["user_name"]) > 0) {
- if ($this->load($attributes["user_name"][0])) {
- return true;
- }
- }
- }
- /*
- if (!isset($pa_options["dont_check_ips"]) || !$pa_options["dont_check_ips"]) {
- if ($vn_user_id = $this->ipAuthenticate()) {
- if ($this->load($vn_user_id)) {
- $ps_username = $this->get("user_name");
- return 2;
- }
- }
- }
- */
- return false;
- }
Add Comment
Please, Sign In to add comment