Anyone else get SQL errors with User.getAllByEmail ?
I'm working on using a front end form to create some content nodes and am gettign a SQL error when trying to retreive the member using their email. I'm using this line:
Snippet
User[] authors = User.getAllByEmail(_email);
But I get the following error:
Incorrect syntax near '@email'.
Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
Exception Details: System.Data.SqlClient.SqlException:
Incorrect syntax near '@email'.
Source Error:
Line 183: String _email = umbraco.cms.businesslogic.member.Member.GetCurrentMember().Email; Line 185: User[] authors = User.getAllByEmail(_email);
Anyone else get SQL errors with User.getAllByEmail ?
I'm working on using a front end form to create some content nodes and am gettign a SQL error when trying to retreive the member using their email. I'm using this line:
Snippet
But I get the following error:
Incorrect syntax near '@email'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '@email'.
Source Error:
Source File: C:\client sites\GCSS 2010\GCSS Intranet\BlogIntranet Usercontrols\Usercontrols\Create-Post.ascx.cs Line: 185
Stack Trace:
The email is retrevide through this code and I've stepped through the code and the email is correct
Snippet
I've changed to:
Snippet
But if anyone else has commens about whether thowks or not, I'll add it to codeplex if anyone else confirms it.
Thanks
Tom
In the post above, I'm using version 4.0.4.1
is working on a reply...