Mailing List Archive

adding DAViCal users from an external system

We are using de CalDAVClient.php to administer our events.
Is there a similar elegant way to administer DAViCal users?

DAViCal-dev mailing list
Re: adding DAViCal users from an external system [ In reply to ]
Hey Ewout,

Davical offers an authentication hook you can easily use:

The Wiki doesn't show a custom auth, but it's basically something like the following...

$c->authenticate_hook['optional'] = false; // Don't fall back to Davical auth
$c->authenticate_hook['call'] = 'MyAuthFunction'; // Name of your custom function

function MyAuthFunction($username, $password)
// Do your authentication
$myUser = DoSomeMagicThing();

// Check some stuff like
// Create/Update Davical user and create home collection
// Fetch the corresponding Davical user
$davUser = DoSomeMoreMagic($myUser);

return $davUser;

See the Wiki, Docs and comments in Davical's auth-functions.php. It takes some time to dug into the stuff, but then it's quite easy at the end. :)


DAViCal-dev mailing list
Re: adding DAViCal users from an external system [ In reply to ]
Hey Daniel,

I haven't worked with custom fields yet, but I had some brainstorming on the topic:

>ensuring that DAViCal will persist the field name and value in the
>database - does the DB support arbitrary attribute/value pairs, or must
>a new column be created for each X-<something>?
Davical is storing the whole VCALENDAR as a single plain text field in 'caldav_data' and parses all the RFC fields into 'calendar_item'. So any X-field will just be in the database and not get touched by Davical. (Hoping to not tell any bulls***, but Andrew can correct me in that case. ^^)

>making some kind of user accessible report based on custom fields (or
even reporting against the standard fields)
With the above this will be tricky as you cannot access the custom fields directly. For a report you could still fetch all the data and parse them in PHP for reporting. The RFC fields are directly queryable in the DB.

>adding the field to the windows in Lightning
Dunno if this is possible without custom builds.

My main concern with custom fields is that you cannot rely on them, if they are filled from external sources as you simply can add what you're up to... but this depends on the scenario you're trying to cover.

DAViCal-dev mailing list