I have some Extranet users. Each user has a dedicated page/item, that is maintained by the Admins. The Admins should manually be able to "connect"/reference the current item to a single extranet user. I am think of something like using a valuelookup type or similar on the template.
But how could i accomblish this, as the users are stored in ASP.NET membership, and not directly in Sitecore, as they were in previous versions of Sitecore.
I think you've got the right idea. Either store the users's full name (Domain\UserName) in the item, or store the item ID in the user's profile. If you go the Profile route, be sure and update Sitecore's User template in the Core DB so that you can see the value in the user manager.
There's also a Sitecore table you could use called IDTable which is normally used for mapping Sitecore item IDs to external data. That might be your best solution since user Profiles can be annoying... will also be the most efficient in terms of finding/indexing this data. Look at the Sitecore examples of importing data to get an example using this API.
Related
Using Sitecore 7.1, we have defined a custom profile with a custom user profile .Net object so that the user's values can be updated in the Security Manager.
In our site, we have a page to display the current user's profile.
If I update a user's details in the Security User Manager, I expect them to be updated on this page. This works fine locally but when we deploy to test (which has separate authoring and delivery servers), the updated details aren't displayed on the page. We have a custom database table that does contain the correct values so I don't know where the incorrect values are coming from (should I be looking at aspnet_Profile table?) ..
We are using IAuthenticationManeger.GetActiveUser().Profile to get the user to display.
Any ideas? Let me know if supplying any other code would help ...
If your are overriding the Sitecore.Security.UserProfile class and using SetCustomProperty method, then yes the values are saved in the aspnet_Profile database. If you update a user profile in a dev environment, you would need to copy those changes to your test environment via serialization or package to see them there.
If you are doing something else, then you may want to post the code for your profile class so we can get a better idea of what is going on.
I'd like to create a tooltip bubbles for my site for new users - many other sites do this (most google apps). I'd like to show them for all accounts created within the last week, unless the user specifically 'dismisses' the tip.
I thought about doing this with cookies - ie. set a "-dismissed=True" value that I could check as well as the account creation date and determine whether to show the tips.
However - this doesn't work across browsers, since cookies aren't shared between browsers. So if a user logs into chrome, dismisses the tip then logs in in FF the tip will reappear.
Does anyone know if there is common way to do this sort of thing? Or at least a better way than what i've described?
I'm using browser length sessions so I can't store it in the session.
You could have a user preferences model, with a one-to-one relationship to the main user model, which stores preferences like this. Create an instance when the user entry itself is created, and default the 'show tips' field to True.
You could also use the new custom user model functionality in 1.5 to store this in the user model itself, but that seems like overkill here.
With Sitecore DMS you can create Profiles and show specific pages based on the user's visiting habits. This information is stored using a cookie so whenever the user comes back they have the same visitor profile. But if they delete their cookies or switch browsers that information is gone. Now what I want to do is save this visitor information to a sitecore user, in that they can log in and their visitor profiles will be the same as when they left, no matter where they are or what browser they are using. I've been trying to figure this out for a while now but without success. Whenever I login with a user and create a specific profile, that profile is deleted as soon as i log out. Is this even possible for Sitecore, because it seems rather silly to only have profiles based on cookies when cookies are deleted constantly.
With Sitecore Analytics, you have two tracking cookies, one is for Session--the other for GlobalSession (which doesn't expire across normal asp.net sessions). Unfortunately, Sitecore doesn't track profile key scores based on GlobalSession, but by a single asp.net session. The entire system is based around this, and it's very disappointing. '
To get around this, I was using OMS and use Reflector to disasssemble and rewrite some of the analytics code to record by global session. It also required a couple of schema changes as well as new rules... pretty extensive work. At the end of the day, because of the size of the database and our need for a very limited number of features, I ended up creating a single table and recording profile key values in that by globalsession.
From what I understand, the schema has changed from OMS to DMS, but the single most important factor, that data is recorded by session, has not changed.
With regard to storing the User's id, you can associate this with a 'tag' which is stored, I believe, with the globalsessionid, at least in OMS. However, Sitecore doesn't update the tag records, so you'll end up with multiple records per global session. If you're storing this value on every request, that table will bloat quickly.
There are a couple of reasons for this... not the least of which is that in many cases, you don't have a logged in user to correlate this information with. The profile data isn't stored in cookies... it's stored in the Analytics table. But it's associated with a cookie that has a unique ID and once that has been deleted, the ID (hopefully!) won't be used again.
A suggestion for how to get around this here in this StackOverflow answer.
I'm new to Sitecore. I have a question about saving a value for a visitor in Sitecore. I want to save a value for the visitor, the next time the visitor comes to the website I want to retrieve this value.
I tried to use Tracker.Visitor.Tag, but this is session scoped. In the next visit the tags are gone.
Is it possible to save visitor specific information to the Sitecore database?
Thank you!
There's nothing particularly special about Sitecore databases for non-authenticated users. Since your users are anonymous, think of it as a standard ASP.NET feature, so you can use session or cookies to persist something. The Sitecore databases really store CMS-driven content, and if necessary, data about specific users in the Core database, however these are authenticated users (built on top of ASP.NET Membership).
One thing to consider is how you want to use this information (perhaps you can elaborate at a higher level of what you're trying to accomplish?). The reason I say this is that if you update a component with user-specific data, if the component caches the HTML output in Sitecore, it will not change per user unless you cache by the exact criteria for which you deem to be a "unique user." This would require a bit of extra work to cache and "Vary by Params" where those params are your custom criteria.
E.g.
Say you have an existing sublayout control which currently caches and varys by data source.
You want to update the code to also display a user-specific value as deemed by a cookie on the user's machine. The specificity of the user is now deemed to be based on this cookie.
Now you also need to update the sublayout to both vary by data source and additionally, vary by the cookie key to separate them from being unique to others.
I have created a custom user profile in Sitecore 6.4.1, and am trying to add a basic droplist to the users profile. It seems that no matter which type of field I add to the user profile, it renders out in the Edit User dialog as a plain text field. Is there a restriction to the user profile, or some other method I need to use to allow content editors to pick an item to associate with a user profile?
The user manager cannot properly render all fields types. You should stick to single line text values if possible and avoid the user manager interface to edit the info itself. Use it more as a custom data store.
Edit: for reference, I've used this feature and extended profiles with simple fields for a login-based system with Sitecore. Our site allows users to register an account, which creates extranet users with an "extended profile" in the Core DB. When these users access thier profile page on the front-end site when they're logged into the front-end, they can edit basic data, like name, address, etc. I store these basic data points in the custom profile SLT fields, so its used merely as a data store. No one actually edits the content from the Sitecore shell's user manager.