In V8 it is stored as normal property value (with alias: umbracoMemberLastPasswordChangeDate).
It can be selected using:
SELECT cm.LoginName, upd.DateValue, cpt.Alias
FROM [cmsMember] as cm
LEFT JOIN [umbracoContentVersion] as udv on udv.NodeId = cm.NodeId
LEFT JOIN [umbracoPropertyData] as upd on upd.VersionId = udv.Id
LEFT JOIN [cmsPropertyType] as cpt on cpt.Id = upd.PropertyTypeId
WHERE cpt.Alias = 'umbracoMemberLastPasswordChangeDate'
Basically it´s the same, only they cleaned up the naming and types in v8.
SELECT cm.LoginName, cv.VersionDate, cpt.Alias
FROM [cmsMember] as cm
inner join [dbo].[cmsContentVersion] cv on cv.ContentId = cm.nodeId
inner join [dbo].[cmsPropertyData] pd on pd.versionId = cv.VersionId
LEFT JOIN [cmsPropertyType] as cpt on cpt.Id = pd.PropertyTypeId
where cpt.Alias = 'umbracoMemberLastPasswordChangeDate'
and LoginName = '{MEMBERLOGIN HERE}' -- optional
This should do the trick. Maybe double check if the versionDate is set correctly.
Where to find Password Changed Date for Members
Does any one know, where in the database I can find the date for when a Member last updated their password ?
I´d say it´s stored in [lastPasswordChangeDate] in table [umbracoUser]. Not sure if and how you can access it in CMS or API.
Yeah I thought so as well :)
I can't find the member in [umbracoUser], but I can find the member in [cmsMember], but this table doesn't have the [lastPasswordChangeDate] column :)
In V8 it is stored as normal property value (with alias:
umbracoMemberLastPasswordChangeDate
).It can be selected using:
Result:
As I can see, in V7 it is also stored as property, (see: https://github.com/umbraco/Umbraco-CMS/blob/master-v7/src/Umbraco.Core/Models/Member.cs), so probably you can use something similar.
I hope this will help. ;)
Cheers,
I almost think it's correct :)
The only problem is that on U7
upd.versionId
is auniqueidentifier
andudv.Id
is anint
, so I can't compare these 2.Now, I'm not an SQL wizard so I don't know how to go around this :)
Basically it´s the same, only they cleaned up the naming and types in v8.
This should do the trick. Maybe double check if the versionDate is set correctly.
is working on a reply...