Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mario Patrao 8 posts 28 karma points
    Aug 13, 2015 @ 15:10
    Mario Patrao
    0

    Roles.AddUserToRole(userName, generatedMemberGroup);

    Hi there,

    Hope you can help with this issue. I'm creating a new user programmatically which is working fine. After I'm trying to add the user to a role. Using the code line: Roles.AddUserToRole(userName, generatedMemberGroup);

    This is causing an error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 6"

    This was working before. But I'm now using the Umbraco version 7.2.8 did something change? By the way I checked that Roles is part of System.Web.Security and both userName and generatedMemberGroup are not empty string and don't contain the char (,).

    Hope you can help me on this.

    Kind regards.

Please Sign in or register to post replies

Write your reply to:

Draft