src/Controller/Component/UserToolComponent.php
public function deleteUser($userId = null, $options = []) {
		$entity = $this->_getUserEntity($userId);
		if ($this->UserTable->delete($entity)) {
			$this->handleFlashAndRedirect('success', $options);

			return true;
		} else {
			$this->handleFlashAndRedirect('error', $options);

			return false;
		}
	}
public function deleteUser($userId = null, $options = []) {
		$entity = $this->_getUserEntity($userId);
		if ($this->UserTable->delete($entity)) {
			$this->handleFlashAndRedirect('success', $options);

			return true;
		} else {
			$this->handleFlashAndRedirect('error', $options);

			return false;
		}
	}
public function deleteUser ( $ userId = null , $ options = [ ] ) { $ entity = $ this -> _getUserEntity ( $ userId ) ; if ( $ this -> UserTable -> delete ( $ entity ) ) { $ this -> handleFlashAndRedirect ( 'success' , $ options ) ; return true ; } else { $ this -> handleFlashAndRedirect ( 'error' , $ options ) ; return false ; } }
Deletes an user record

@param mixed $userId User ID
@param array $options Options
@return bool
Deletes an user record