Changeset 587 for trunk/include/functions_user.inc.php
- Timestamp:
- Oct 30, 2004, 5:42:29 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r532 r587 70 70 $query.= " WHERE username = '".$login."'"; 71 71 $query.= ';'; 72 $result = mysql_query( $query );72 $result = pwg_query( $query ); 73 73 if ( mysql_num_rows($result) > 0 ) $error[$i++] = $lang['reg_err_login5']; 74 74 } … … 95 95 $query.= " WHERE username = 'guest'"; 96 96 $query.= ';'; 97 $row = mysql_fetch_array( mysql_query( $query ) );97 $row = mysql_fetch_array( pwg_query( $query ) ); 98 98 // 2. adding new user 99 99 $query = 'INSERT INTO '.USERS_TABLE; … … 116 116 } 117 117 $query.= ');'; 118 mysql_query( $query );118 pwg_query( $query ); 119 119 // 3. retrieving the id of the newly created user 120 120 $query = 'SELECT id'; 121 121 $query.= ' FROM '.USERS_TABLE; 122 122 $query.= " WHERE username = '".$login."';"; 123 $row = mysql_fetch_array( mysql_query( $query ) );123 $row = mysql_fetch_array( pwg_query( $query ) ); 124 124 $user_id = $row['id']; 125 125 // 4. adding access to the new user, the same as the user "guest" … … 129 129 $query.= ' where u.id = ua.user_id'; 130 130 $query.= " and u.username = 'guest';"; 131 $result = mysql_query( $query );131 $result = pwg_query( $query ); 132 132 while( $row = mysql_fetch_array( $result ) ) 133 133 { … … 135 135 $query.= ' (user_id,cat_id) VALUES'; 136 136 $query.= ' ('.$user_id.','.$row['cat_id'].');'; 137 mysql_query ( $query );137 pwg_query ( $query ); 138 138 } 139 139 // 5. associate new user to the same groups that the guest … … 144 144 $query.= ' AND ug.user_id = u.id'; 145 145 $query.= ';'; 146 $result = mysql_query( $query );146 $result = pwg_query( $query ); 147 147 while( $row = mysql_fetch_array( $result ) ) 148 148 { … … 151 151 $query.= ' ('.$user_id.','.$row['group_id'].')'; 152 152 $query.= ';'; 153 mysql_query ( $query );153 pwg_query ( $query ); 154 154 } 155 155 } … … 188 188 $query.= ' WHERE id = '.$user_id; 189 189 $query.= ';'; 190 mysql_query( $query );190 pwg_query( $query ); 191 191 } 192 192 return $error; … … 271 271 $sql.= " WHERE "; 272 272 $sql .= ( ( is_integer($user) ) ? "id = $user" : "username = '" . str_replace("\'", "''", $user) . "'" ) . " AND id <> " . ANONYMOUS; 273 $result = mysql_query($sql);273 $result = pwg_query($sql); 274 274 return ( $row = mysql_fetch_array($result) ) ? $row : false; 275 275 }
Note: See TracChangeset
for help on using the changeset viewer.