src/Transfer/EzPlatform/Repository/Manager/UserManager.php 1 location
|
@@ 185-198 (lines=14) @@
|
| 182 |
|
/** |
| 183 |
|
* {@inheritdoc} |
| 184 |
|
*/ |
| 185 |
|
public function remove(ObjectInterface $object) |
| 186 |
|
{ |
| 187 |
|
if (!$object instanceof UserObject) { |
| 188 |
|
throw new UnsupportedObjectOperationException(UserObject::class, get_class($object)); |
| 189 |
|
} |
| 190 |
|
|
| 191 |
|
$user = $this->find($object); |
| 192 |
|
|
| 193 |
|
if ($user) { |
| 194 |
|
$this->userService->deleteUser($user); |
| 195 |
|
} |
| 196 |
|
|
| 197 |
|
return true; |
| 198 |
|
} |
| 199 |
|
|
| 200 |
|
/** |
| 201 |
|
* Assigns a collection of Transfer user groups from an eZ user, and returns the once who were added. |
src/Transfer/EzPlatform/Repository/Manager/UserGroupManager.php 1 location
|
@@ 206-217 (lines=12) @@
|
| 203 |
|
/** |
| 204 |
|
* {@inheritdoc} |
| 205 |
|
*/ |
| 206 |
|
public function remove(ObjectInterface $object) |
| 207 |
|
{ |
| 208 |
|
if (!$object instanceof UserGroupObject) { |
| 209 |
|
throw new UnsupportedObjectOperationException(UserGroupObject::class, get_class($object)); |
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
$userGroup = $this->find($object, true); |
| 213 |
|
|
| 214 |
|
$this->userService->deleteUserGroup($userGroup); |
| 215 |
|
|
| 216 |
|
return true; |
| 217 |
|
} |
| 218 |
|
} |
| 219 |
|
|