As far as i know, there is now built in function for this in DBMan SQL. You need to build a plugin. However in the GT Lib are very good functions to do that. You may look at the beta version of the forum to get an idea how to use it.
Im just in the process of building an email lost password function. But this is not ready yet.
Im just in the process of building an email lost password function. But this is not ready yet.