make_default() public method

public make_default ( )
Beispiel #1
0
 public function on_user_sign_out($pars)
 {
     $user = new AmyUser($this->configuration);
     $user->make_default();
     $user->create_session();
     self::setResult(true);
 }
Beispiel #2
0
    $amy_user = $GLOBALS['amy_user'];
} else {
    try {
        $session = new AmySession($_AMY_CONF);
        $session->authorize();
        $amy_user = new AmyUser($_AMY_CONF);
        $amy_user->load_from_session($session);
    } catch (Exception $e) {
    }
}
try {
    if (!is_object($amy_user)) {
        $amy_user = new AmyUser($_AMY_CONF);
    }
    if (!$amy_user->is_authorized()) {
        $amy_user->make_default();
    }
    $amy_session = $amy_user->create_session();
} catch (Exception $e) {
    if ('development' == $GLOBALS['_AMY_CONF']['environment']) {
        echo '<h1>Amy Editor Exception</h1>';
        echo $e->getMessage();
        echo '<hr/><pre>';
        print_r($e);
        die;
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">