public static function convert(GWF_User $user, $password) { if (false === ($row = self::table(__CLASS__)->getRow($user->getID()))) { return true; } $oldHash = self::oldHash($password); if ($oldHash !== $row->getVar('pmap_password')) { return GWF_Module::getModule('WeChall')->error('err_password'); } $row->delete(); $user->saveVar('user_password', GWF_Password::hashPasswordS($password)); return true; }