0

I have two questions: 1)I'am working in project using UGC and i want to access to data in UGC database. can i open database with sql Server?

2)When an author added a comment which detail of user will be saved in uGC database. I have this code for adding comment:

<form method="post" id="commentForm">
        <table border="0">
            <tr>
                <td colspan="2">
                    <input id="newCommentName" type="hidden" name="username@@Component.ID@@@@Page.ID@@" value="<%=HttpContext.Current.User.Identity.Name%>"/>
                    <label for="newCommentText">Enter comment:</label><br/>
                    <textarea id="newCommentText" rows="4" cols="30" name="addComment@@Component.ID@@@@Page.ID@@"></textarea>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <input type="submit" id="B1" name="B1" value="Submit"/>

                </td>
            </tr>
        </table>
    </form>

After submitting comment it appear with another detail (not HttpContext.Current.User.Identity.Name)

Thanks.

1
  • Can you share code for adding comment?
    – user1032
    Commented May 5, 2014 at 13:05

2 Answers 2

1

By default the UGC database is called Tridion_Ugc so you can open it in SQL Management Studio. There is a USERS table.

I think there is a trick to pass the authenticated Audience Manager contact as the user posting the comment (via the Ambient Data Framework), else you only get Anonymous as the user name. You can do this by calling SyncUGCUserWithContact() See Documentation Here - Login required

0

I found the database but i didn't found the access code(UseName and Password) to open it with SQL. My question is where can i found theses code(In which file)?

I use cookies for logging user and the code above for adding comment.I want to see the details of form subbmited(Which user and the comment).

PS: comments subbmited correctly but in User Generated Comments in SDL i found another detail of the user(it's the same user but in my code above i want to add comment with this identity HttpContext.Current.User.Identity.Name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.