private function generateRecoveryToken(\core_kernel_classes_Resource $user)
    {
        $this->deleteToken($user);
        
        $token = md5(uniqid(mt_rand(), true));
        $tokenProperty = new \core_kernel_classes_Property(self::PROPERTY_PASSWORD_RECOVERY_TOKEN);
        $user->setPropertyValue($tokenProperty, $token);

        return $token;
    }