public function resetPassword(array $data)
    {
        $result = array();
        $this->hook->attach('user.reset.password.before', $data, $result, $this);

        if (!empty($result)) {
            return (array) $result;
        }

        if (empty($data['user']['user_id'])) {
            return $this->getResultError();
        }

        if (isset($data['password'])) {
            $result = $this->resetPasswordFinish($data);
        } else {
            $result = $this->resetPasswordStart($data);
        }

        $this->session->regenerate(true);
        $this->hook->attach('user.reset.password.after', $data, $result, $this);
        return (array) $result;
    }