Beispiel #1
0
function xmlrpc_getLastUpdate($method_name, $params)
{
    $uid = array_pop($params);
    if (is_array($uid)) {
        return Planworld::getLastUpdate($uid);
    } else {
        if (is_string($uid) && Planworld::isUser($uid)) {
            return Planworld::getLastUpdate($uid);
        } else {
            return array('faultCode' => 800, 'faultString' => 'No such user');
        }
    }
}
Beispiel #2
0
 /**
  * Does this user exist?
  * @public
  * @returns bool
  */
 function isUser()
 {
     if (!isset($this->valid)) {
         $this->valid = Planworld::isUser($this->username, true);
     }
     return $this->valid;
 }
Beispiel #3
0
$planworld_url_base = eregi_replace("[A-z.]+\$", "", $_SERVER['PHP_SELF']);
define('PW_URL_BASE', $planworld_url_base);
define('PW_URL_INDEX', $planworld_url_base);
unset($planworld_url_base);
/* includes */
$_base = dirname(__FILE__) . '/';
/* if the authentication system uses $PHP_AUTH_USER (HTTP auth), the
 order of the next 2 files matters; if the auth scripts unset
 $PHP_AUTH_USER, auth.php (or its substitute) must come first in order
 for users to show up in the logs */
require_once $_base . 'config.php';
require_once $_base . 'lib/Planworld.php';
/* Amherst specific alumni conversion for new users */
/*** MUST COME BEFORE auth.php IS INCLUDED ***/
if (isset($_SESSION['note_user'])) {
    if (is_numeric(substr($_SESSION['note_user'], -2)) && !Planworld::isUser($_SESSION['note_user'])) {
        // change the user's name
        $query = "UPDATE users SET username='******'note_user'] . "' WHERE username='******'note_user'], 0, -2) . "'";
        Planworld::query($query);
    }
}
/* end Amherst specific code */
require_once 'auth.php';
require_once $_base . 'lib/Online.php';
require_once $_base . 'lib/User.php';
PEAR::setErrorHandling(PEAR_ERROR_PRINT);
/* set the random function to use (varies by database) */
if (PW_DB_TYPE == 'pgsql') {
    define('PW_RANDOM_FN', 'RANDOM()');
} else {
    if (PW_DB_TYPE == 'mysql') {