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 |
---|
\strint
New users id ( username )
bool
array
Users profile defaults. If it false it will not be added.
bool
array
Users profile settings. If it false it will not be added.
bool
getAllUsersProfiles() : array
NOTICE: c_defaults and c_settings in database is stored as json array
access | public |
---|
array
All 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" } }
string
Users id (username) to have a list of his resources.
bool
If it set to true then it will look for calendars. False for contacts.
array
bool
getUserProfile(\strint $uid) : array | bool
NOTICE: c_defaults and c_settings in database is stored as json array
access | public |
---|
\strint
User id ( usrname )
array
bool
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'];
string
Users id (username) to share resource with.
string
Resource owner SOGo user id (username)
string
Resource name for example personal.
\strig
array
Privileges to set.
bool
If it set to true then it will look for calendar. False for contacts.
bool
subscribeResource(string $uid, string $own_uid, string $name, bool $calendar, string $color) : bool
string
Users id (username) which is suscribing
string
Resource owner SOGo user id (username)
string
Resource name for subscribing
bool
If it set to true then it will look for calendar. False for contacts.
string
Color for new calendar. Applies only for calendars.
bool
unsetAccessPrivileges(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.
string
Users id (username) to share resource with.
string
Resource owner SOGo user id (username)
string
Resource name for example personal.
bool
If it set to true then it will look for calendar. False for contacts.
bool
updateUserProfile(\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 |
---|
\strint
Users id to edit ( username )
bool
array
Users profile defaults. If it false it will not be updated to null it will leave es it is.
bool
array
Users profile settings. If it false it will not be updated to null it will leave es it is.
bool