Correct logic error that prevented users from changing their usernames
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Jan 2008 03:10:55 +0000 (03:10 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Jan 2008 03:10:55 +0000 (03:10 +0000)
(res = '0' because the username isn't found, but '0' != their user ID so it was always failing)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@8524 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/myopac.js

index 362834a..0e5b49f 100644 (file)
@@ -859,7 +859,7 @@ function myOPACUpdateUsername() {
        var req = new Request(CHECK_USERNAME, G.user.session, username);
        req.send(true);
        var res = req.result();
-       if( res && res != G.user.id() ) {
+       if( res && res == G.user.id() ) {
                alertId('myopac_username_dup');
                return;
        }