From abdfad31934dfa36cbbe4bc9639e45c88a5f4062 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 18 Mar 2010 21:51:44 +1300 Subject: [PATCH] Don't need :user_no set on INSERT. --- inc/auth-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/auth-functions.php b/inc/auth-functions.php index 805012c6..8c4969c0 100644 --- a/inc/auth-functions.php +++ b/inc/auth-functions.php @@ -113,7 +113,9 @@ function UpdateUserFromExternal( &$usr ) { else $type = "INSERT"; - $qry = new AwlQuery( sql_from_object( $usr, $type, 'usr', "WHERE user_no= :user_no" ), array( ':user_no' => $usr->user_no) ); + $params = array(); + if ( $type != 'INSERT' ) $params[':user_no'] = $usr->user_no; + $qry = new AwlQuery( sql_from_object( $usr, $type, 'usr', "WHERE user_no= :user_no" ), $params ); $qry->Exec('Login',__LINE__,__FILE__); /**