cancel
Showing results for 
Search instead for 
Did you mean: 

set password auto expiration

monicakumari
Star Contributor
Star Contributor

Hello everyone. I am trying to do something like -

      All user passwords should expire every 90 days.
      Users should be forced to reset their expired passwords upon login to share with last password.

anybody have any idea, how to do it ?

thanks in advance.

1 ACCEPTED ANSWER

this worked..

var userNodeQuery = "TYPE:\"usr:user\"";
	var userNodeQueryDef = {
		       query: userNodeQuery ,
		       language: "fts-alfresco" ,
			   store: "user://alfrescoUserStore"
		};
	
	userNodes = search.query(userNodeQueryDef);

View answer in original post

14 REPLIES 14

The javascript file is running using scheduler(attached). currently javascript is working fine. I have tested multiple times with three users. the only issue is when the scheduler triggers, the onCreateNode behaviour(GenerateNewUsersMail.java) triggers automatically, which should not. This is not creating any impact but I think It may create issue in future.

thanks.

Hello Axel,

you were correct. I was able to do it with sdk 2.2, but not able to search user properties (prefix : usr) with latest sdk.

I am getting exceptions :

         Failed to execute search: @usr\:username:*

         Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 00240096 No solr query support for store user://alfrescoUserStore

could you please help me with the other way to search users instead of search.luceneSearch("user://alfrescoUserStore", "@usr\\:username:\*");

I need the user properties from user node.

Thanks.

this worked..

var userNodeQuery = "TYPE:\"usr:user\"";
	var userNodeQueryDef = {
		       query: userNodeQuery ,
		       language: "fts-alfresco" ,
			   store: "user://alfrescoUserStore"
		};
	
	userNodes = search.query(userNodeQueryDef);

"Good day.

I am interested in implementing a feature for password auto-expiration within Alfresco.


@monicakumari wrote:

this worked..

var userNodeQuery = "TYPE:\"usr:user\"";
	var userNodeQueryDef = {
		       query: userNodeQuery ,
		       language: "fts-alfresco" ,
			   store: "user://alfrescoUserStore"
		};
	
	userNodes = search.query(userNodeQueryDef);

This feature would prompt users to change their passwords after a period of 60 days. Could you please provide guidance on how to implement this functionality?

Thank you

Thanks alot. I can see the correct values on node browser.

I need on more help. I am trying to fetch " usr:credentialsExpiryDate " property through javascript. but I am getting null in it.

get-Details.js

var user;
var nodes = people.getPeople(null);
for each(var node in nodes)
{
logger.log(node);
user = utils.getNodeFromString(node);
logger.log(user.properties["cm:userName"] + " '"
+ user.properties["cm:firstName"] + "' '"
+ user.properties["usr:credentialsExpiryDate"] + "'");
}

the other two properties are showing correct values on console. but usr:credentialsExpiryDate is showing null.

I think this is again the nodeRef issue.

do you have any idea how to fetch usr:credentialsExpiryDate through javascript ?