1 <?php
2
3 /*
4 * This file is part of the Icybee package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee\Modules\Users;
13
14 /**
15 * Deletes a user.
16 */
17 class DeleteOperation extends \ICanBoogie\DeleteOperation
18 {
19 protected function validate(\ICanBoogie\Errors $errors)
20 {
21 if ($this->key == 1)
22 {
23 $errors['uid'] = $errors->format("Daddy cannot be deleted.");
24 }
25
26 return parent::validate($errors);
27 }
28 }