Tuesday, April 05, 2011 at 2:00 PM.

system.verbs.builtins.opmlEditor.member.validate

on validate (username, password) {
	<<Changes
		<<4/4/11; 9:23:46 AM by DW
			<<initMember can fail -- if there is no user with that username. We should just return false.
		<<3/6/11; 7:04:52 PM by DW
			<<Created. 
	local (adrmember, now = clock.now ());
	bundle { //find the member's table, return false if fail -- 4/4/11 by DW
		try {
			adrmember = opmlEditor.member.initMember (username)}
		else {
			return (false)}};
	if adrmember^.prefs.enabled {
		if adrmember^.prefs.password == password {
			adrmember^.stats.ctValidate++;
			adrmember^.stats.whenLastValidate = now;
			return (true)}};
	adrmember^.stats.ctNotValidate++;
	adrmember^.stats.whenLastNotValidate = now;
	return (false)}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.