summaryrefslogtreecommitdiffstats
path: root/apps/calendar/ajax/share/share.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/calendar/ajax/share/share.php')
-rwxr-xr-x[-rw-r--r--]apps/calendar/ajax/share/share.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/calendar/ajax/share/share.php b/apps/calendar/ajax/share/share.php
index 70f1ec26ae6..9f4dc39e524 100644..100755
--- a/apps/calendar/ajax/share/share.php
+++ b/apps/calendar/ajax/share/share.php
@@ -43,10 +43,10 @@ if($sharetype == 'group' && !OC_Group::groupExists($sharewith)){
OC_JSON::error(array('message'=>'group not found'));
exit;
}
-if($sharetype == 'user' && OC_User::getUser() == $sharewith){
+if($sharetype == 'user' && OCP\USER::getUser() == $sharewith){
OC_JSON::error(array('meesage'=>'you can not share with yourself'));
}
-$success = OC_Calendar_Share::share(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT));
+$success = OC_Calendar_Share::share(OCP\USER::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT));
if($success){
if($sharetype == 'public'){
OC_JSON::success(array('message'=>$success));