X-Git-Url: https://git.mdrn.pl/piwik-CASLogin.git/blobdiff_plain/237569a1cfdd478618b0ecda78a7ac13548c515f..dc6aefd9f59af623481149a8b6c71b973efd1196:/CAS/docs/examples/create_pgt_storage_db_table.php diff --git a/CAS/docs/examples/create_pgt_storage_db_table.php b/CAS/docs/examples/create_pgt_storage_db_table.php new file mode 100644 index 0000000..11cc7a0 --- /dev/null +++ b/CAS/docs/examples/create_pgt_storage_db_table.php @@ -0,0 +1,49 @@ + + * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 + * @link https://wiki.jasig.org/display/CASC/phpCAS + */ + +// Load the settings from the central config file +require_once 'config.php'; +// Load the CAS lib +require_once $phpcas_path . '/CAS.php'; + + +// Dummy client because we need a 'client' object +$client = new CAS_Client(CAS_VERSION_2_0, true, $cas_host, $cas_port, $cas_context, false); + +// Set the torage object +$cas_obj = new CAS_PGTStorage_Db($client, $db, $db_user, $db_password, $db_table, $driver_options); +$cas_obj->init(); +$cas_obj->createTable(); +?> + + + phpCAS PGT db storage table creation + + + +
+' . $db_table . ' successfully created in database ' . $db . ''; +?> +
+ + \ No newline at end of file