Skip to content

Instantly share code, notes, and snippets.

@fabriziomachado
Created November 1, 2011 17:56
Show Gist options
  • Save fabriziomachado/1331354 to your computer and use it in GitHub Desktop.
Save fabriziomachado/1331354 to your computer and use it in GitHub Desktop.
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); }
class ErpAuthentication implements Authentication {
public function authenticate(Account $account)
{
#echo "ErpAuthentication::autenticate" . PHP_EOL;
$current_user = Account::find(array('provider'=>'erp','login'=> $account->login));
if( $current_user )
{
return $current_user->person;
}
return FALSE;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment