I would be very pleased if someone could help me.
Today, i had a problem. I made a webusercontrol wich represents
a form where we can register users, that´s ok.
The problem was that i needed to save some extra information on metadata. I watched some sitefinity demos that show me how can i do it by adding keys on webconfig. I add that keys :
<add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/>
<add name="IsCriovidaClient" type="Boolean"/>
Thereafter, i change user.aspx code that comes in sitefinity to accomplish the task, like i saw in video. Until that point everything is ok.
Thereafter i tried to implement the same logic on my webusercontrol with no success, because i don´t know how have I to use sinefinity api to create this usermetadata info. It should be somethink similar to user.aspx create user event button code, but i cant see this code.
So, I saw an object in sitefinity api called UsermetaInfo, and tried by this way, without any success :
Here are my control variables:
string nomeCompleto = String.Empty;
string email = String.Empty;
string password = String.Empty;
string passwordConfirmacao = String.Empty;
bool ? clienteCriova = null;
bool ? authorizeInfo = null;
And the code:
MembershipCreateStatus sucessVar = MembershipCreateStatus.Success;
MembershipUser user = Membership.Providers["Sitefinity"].CreateUser(txtNomeCompleto.Text,
txtPassword.Text, txtEmail.Text, null, null, true, null,out sucessVar);
Telerik.DataAccess.AspnetProviders.UserMetaInfo userMetaInfo = new Telerik.DataAccess.AspnetProviders.UserMetaInfo();
userMetaInfo.UserId = new Guid(user.ProviderUserKey.ToString());
userMetaInfo.PropertyName = "AuthPessInfToBeUsed";
userMetaInfo.Text = false.ToString();
object o = Nolics.ORMapper.Base.ObDataCache.Current;
Despite of I can see in debug that all the parameters i have passed to function create are not null, i´ve got
object reference not set to an instance of an object
The point is , Am I in the right direction to do what i want to do ?
Is it done with this object UserMetaInfo, or how can i do it ?
Sorry my bad english,
I really will be very great if you can help me.