// access checks are done inside method
     case "selectbyid":
         $result = $users->selectByID($id);
         break;
     case "select":
         $result = $users->select();
         break;
         // list with order, index, count and where
     // list with order, index, count and where
     case "enumerate":
         $result = $users->enumerate();
         break;
         // list with where
     // list with where
     case "login":
         $result = $am->login($user, $pass, $sid);
         break;
     case "pwcheck":
         $result = $am->checkPassword($user, $pass);
         break;
         // just check pass, dont create session
     // just check pass, dont create session
     case "logout":
         $result = $am->logout();
         break;
     default:
         throw new Exception("userFunctions:: invalid operation: '{$operation}' provided");
 }
 if ($result === null) {
     throw new Exception($users->errormsg);
 }
Beispiel #2
0
function OAuthTest()
{
    $authManager = new AuthManager();
    $authManager->login(NULL, "twitter");
}