Tuesday, August 18, 2009 at 7:54 PM.
howtoSuite.validateUser
on validateUser (what) { <<Changes <<8/6/08; 1:13:02 PM by DW <<Check with identi.ca, if the username/password are cool, return true, otherwise all hell breaks loose. :-) identica.init (); local (username = user.identica.prefs.username); local (password = user.identica.prefs.password); if (username != "") and (password != "") { if identica.authenticate (username, password) { return (true)}}; local (prompt = "Can't " + what + " because the Identi.ca username/password were rejected by the server."); if dialog.twoway (prompt, "Edit", "Cancel") { opmlEditor.prefs.openIdenticaPage ()}; return (false)} <<bundle //test code <<validateUser ("stink up your butt")
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.