Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Jul 08, 2010 @ 10:49
    Bex
    0

    Anyone else getting an error on getAllByEmail()?

    Hello!

    I am using the following line of code:

     User[] usersByEmail = User.getAllByEmail(email);

    and I get the yellow screen of death with this error:

    "System.Data.SqlClient.SqlException: Incorrect syntax near '@email'."

    I am using umbraco version 4 042.

    Is anyone else getting this error?

    Bex

  • Tom Madden 253 posts 455 karma points MVP 4x c-trib
    Jul 08, 2010 @ 15:51
    Tom Madden
    0

    Yup,

    same error for me as posted here on 1/7

    http://our.umbraco.org/forum/developers/api-questions/10282-Anyone-else-get-SQL-errors-with-UsergetAllByEmail-

    I used the login name instead to get round it

    Tom

     

  • Bex 444 posts 555 karma points
    Jul 08, 2010 @ 16:15
    Bex
    0

    ah.. that didn't come up when I did a search!

    I have submitted an issue on codeplex for it now tho..

    Checked the code and there is a bug, I have fixed it in my version and recompiled as I have to check email as I'm creating users by code and want to check if the email is in use.

    http://umbraco.codeplex.com/workitem/28012

    Still seems to be broken in 4.5!

Please Sign in or register to post replies

Write your reply to:

Draft