diff options
author | Stefan Hacker <dd0t@users.sourceforge.net> | 2015-02-19 21:07:49 +0300 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2015-02-19 21:07:49 +0300 |
commit | 823f64a7a51c9dcee06f338f29c308f552c21a8a (patch) | |
tree | cf6540e5a2bfb6f5d0228672f00a41ef17c5538c /Authenticators/phpBB3 | |
parent | 1d4ab5c72ae801e832ba1d0d6eecb2f5717c9958 (diff) |
Fix single argument queries with mysqldb in Authenticators.
Seems like the call style we used for these was non-standart or
deprecated.
Diffstat (limited to 'Authenticators/phpBB3')
-rwxr-xr-x | Authenticators/phpBB3/phpBB3auth.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Authenticators/phpBB3/phpBB3auth.py b/Authenticators/phpBB3/phpBB3auth.py index 602c84e..ac3077d 100755 --- a/Authenticators/phpBB3/phpBB3auth.py +++ b/Authenticators/phpBB3/phpBB3auth.py @@ -463,7 +463,7 @@ def do_main_program(): try: sql = 'SELECT user_id, user_password, user_type, username FROM %susers WHERE (user_type = 0 OR user_type = 3) AND LOWER(username) = LOWER(%%s)' % cfg.database.prefix - cur = threadDB.execute(sql, name) + cur = threadDB.execute(sql, [name]) except threadDbException: return (FALL_THROUGH, None, None) @@ -478,7 +478,7 @@ def do_main_program(): # Authenticated, fetch group memberships try: sql = 'SELECT group_name FROM %suser_group JOIN %sgroups USING (group_id) WHERE user_id = %%s' % (cfg.database.prefix, cfg.database.prefix) - cur = threadDB.execute(sql, uid) + cur = threadDB.execute(sql, [uid]) except threadDbException: return (FALL_THROUGH, None, None) @@ -519,7 +519,7 @@ def do_main_program(): try: sql = 'SELECT user_id FROM %susers WHERE (user_type = 0 OR user_type = 3) AND LOWER(username) = LOWER(%%s)' % cfg.database.prefix - cur = threadDB.execute(sql, name) + cur = threadDB.execute(sql, [name]) except threadDbException: return FALL_THROUGH @@ -548,7 +548,7 @@ def do_main_program(): # Fetch the user from the database try: sql = 'SELECT username FROM %susers WHERE (user_type = 0 OR user_type = 3) AND user_id = %%s' % cfg.database.prefix - cur = threadDB.execute(sql, bbid) + cur = threadDB.execute(sql, [bbid]) except threadDbException: return FALL_THROUGH @@ -583,7 +583,7 @@ def do_main_program(): bbid = id - cfg.user.id_offset try: sql = 'SELECT username, user_avatar, user_avatar_type FROM %susers WHERE (user_type = 0 OR user_type = 3) AND user_id = %%s' % cfg.database.prefix - cur = threadDB.execute(sql, bbid) + cur = threadDB.execute(sql, [bbid]) except threadDbException: return FALL_THROUGH @@ -654,7 +654,7 @@ def do_main_program(): try: sql = 'SELECT user_id, username FROM %susers WHERE (user_type = 0 OR user_type = 3) AND username LIKE %%s' % cfg.database.prefix - cur = threadDB.execute(sql, filter) + cur = threadDB.execute(sql, [filter]) except threadDbException: return {} |