A SOGo API via direct database manipulation.
| category | OSS | 
|---|---|
| package | OSS_API | 
| copyright | Copyright (c) 2007 - 2013, Open Source Solutions Limited, Dublin, Ireland | 
| license | New BSD License | 
__construct(array $dbparams) : void
array
addUserProfile(\strint $uid, bool | array $defaults, bool | array $settings) : bool
NOTICE: c_defaults and c_settings in database is stored as JSON array
| access | public | 
|---|
\strintNew users id ( username )
boolarrayUsers profile defaults. If it false it will not be added.
boolarrayUsers profile settings. If it false it will not be added.
boolgetAllUsersProfiles() : array
NOTICE: c_defaults and c_settings in database is stored as json array
| access | public | 
|---|
arrayAll users profiles existing in the databasegetResourceNames(string $uid, bool $calendar) : array | bool
Return array structure: array(1) { [0] => array(3) { 'db_table' => string(23) "sogoopensolu00471298964" 'resource_name' => string(8) "personal" 'display_name' => string(17) "Personal Calendar" } }
stringUsers id (username) to have a list of his resources.
boolIf it set to true then it will look for calendars. False for contacts.
arraybool
getUserProfile(\strint $uid) : array | bool
NOTICE: c_defaults and c_settings in database is stored as json array
| access | public | 
|---|
\strintUser id ( usrname )
arraybool
setAccessPrivileges(string $uid, string $own_uid, string $name, \strig | array $privileges, bool $calendar) : bool
First script fill find acl table name for resource. then it will remove privileges for the user and then it will add new ones.
Privileges array sample $privileges = ['ConfidentialDandTViewer','ObjectCreator','PublicViewer','ConfidentialViewer','ObjectEraser'];
stringUsers id (username) to share resource with.
stringResource owner SOGo user id (username)
stringResource name for example personal.
\strigarrayPrivileges to set.
boolIf it set to true then it will look for calendar. False for contacts.
boolsubscribeResource(string $uid, string $own_uid, string $name, bool $calendar, string $color) : bool
stringUsers id (username) which is suscribing
stringResource owner SOGo user id (username)
stringResource name for subscribing
boolIf it set to true then it will look for calendar. False for contacts.
stringColor for new calendar. Applies only for calendars.
boolunsetAccessPrivileges(string $uid, string $own_uid, string $name, bool $calendar) : bool
First script fill find acl table name for resource. then it will remove privileges for the user.
stringUsers id (username) to share resource with.
stringResource owner SOGo user id (username)
stringResource name for example personal.
boolIf it set to true then it will look for calendar. False for contacts.
boolupdateUserProfile(\strint $uid, bool | array $defaults, bool | array $settings) : bool
To reset defaults or settings pass empty array. If defaults and settings will be false function will return false without even trying to process sql query.
NOTICE: c_defaults and c_settings in database is stored as JSON array
| access | public | 
|---|
\strintUsers id to edit ( username )
boolarrayUsers profile defaults. If it false it will not be updated to null it will leave es it is.
boolarrayUsers profile settings. If it false it will not be updated to null it will leave es it is.
bool