public function imagesEntry($userId, $json, $operation) { $UserObj = new UserController(); $allUser = $UserObj->getAllUser(); \Cake\Log\Log::debug("New image enrty in sync table json : " . $json); if ($allUser) { foreach ($allUser as $user) { if ($user->userId != $userId) { $this->getTableObj()->Insert($user->userId, $json, $this->imageTable, $operation); } } } }