" ). Version: 0.9 Author: Andrey Abramov. Author URI: http://n0tablog.wordpress.com/ */ /* Copyright 2007 Andrey Abramov This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ function AA_trim_at_login ($userid, $password) { $password = trim($password,' \"\t'); } function AA_trim_when_compare ($userid, $password_1, $password_2) { $password_1 = trim($password_1,' \"\t'); $password_2 = trim($password_2,' \"\t'); } add_action ('wp_authenticate', 'AA_trim_at_login', 10, 2); // - hook used at login add_action ('check_passwords', 'AA_trim_when_compare', 10, 3); // - hook used when changing user password ?>