mirror of
https://github.com/owncloudarchive/contacts.git
synced 2024-12-01 13:24:10 +01:00
Add missing backslash to delete addressbook method
Relevant error: [09-Feb-2013 17:03:31] PHP Fatal error: Class 'OCA\Contacts\OCP\User' not found in /Users/tomneedham/Sites/htdocs/cloud/apps2/contacts/lib/addressbook.php on line 349 Relevant Backtrace: [09-Feb-2013 17:03:31] PHP 7. OC_User::deleteUser() /Users/tomneedham/Sites/htdocs/cloud/apps2/provisioning_api/lib/users.php:169 [09-Feb-2013 17:03:31] PHP 8. OC_Hook::emit() /Users/tomneedham/Sites/htdocs/cloud/lib/user.php:228 [09-Feb-2013 17:03:31] PHP 9. call_user_func() /Users/tomneedham/Sites/htdocs/cloud/lib/hook.php:71 [09-Feb-2013 17:03:31] PHP 10. OCA\Contacts\Hooks::deleteUser() /Users/tomneedham/Sites/htdocs/cloud/lib/hook.php:0 [09-Feb-2013 17:03:31] PHP 11. OCA\Contacts\Addressbook::delete() /Users/tomneedham/Sites/htdocs/cloud/apps2/contacts/lib/hooks.php:59
This commit is contained in:
parent
101bffb127
commit
8912726a56
@ -346,7 +346,7 @@ class Addressbook {
|
||||
public static function delete($id) {
|
||||
$addressbook = self::find($id);
|
||||
|
||||
if ($addressbook['userid'] != \OCP\User::getUser() && !\OC_Group::inGroup(OCP\User::getUser(), 'admin')) {
|
||||
if ($addressbook['userid'] != \OCP\User::getUser() && !\OC_Group::inGroup(\OCP\User::getUser(), 'admin')) {
|
||||
$sharedAddressbook = \OCP\Share::getItemSharedWithBySource('addressbook', $id);
|
||||
if (!$sharedAddressbook || !($sharedAddressbook['permissions'] & \OCP\PERMISSION_DELETE)) {
|
||||
throw new Exception(
|
||||
|
Loading…
Reference in New Issue
Block a user