Hello,
i am using the Vokuro system, and now i am trying to use the delete function, but it aborts in Model Users.php.
What could be the problem?
It goes always in the second if " if (!$user->delete()) " with Model message
public function deleteAction($id)
{
$user = Users::findFirstById($id);
if (!$user) {
$this->flash->error("User was not found");
return $this->dispatcher->forward(array(
'action' => 'index'
));
}
if (!$user->delete()) {
$this->flash->error($user->getMessages());
} else {
$this->flash->success("User was deleted");
}
return $this->dispatcher->forward(array(
'action' => 'index'
));
}
$this->hasMany('id', 'Vokuro\Models\SearchCriteria', 'usersId', array(
'alias' => 'searchCriteria',
'foreignKey' => array(
'message' => 'Search cannot be deleted because it\'s used on Users'
)
));
Rgds Stefan