Changeset 650 for trunk/admin
- Timestamp:
- Dec 20, 2004, 8:26:43 PM (20 years ago)
- Location:
- trunk/admin/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r647 r650 331 331 // - all sessions linked to this user 332 332 // - all categories informations linked to this user 333 function delete_user( $user_id)333 function delete_user($user_id) 334 334 { 335 335 // destruction of the access linked to the user 336 $query = 'DELETE FROM '.PREFIX_TABLE.'user_access'; 337 $query.= ' WHERE user_id = '.$user_id; 338 $query.= ';'; 339 pwg_query( $query ); 336 $query = ' 337 DELETE FROM '.USER_ACCESS_TABLE.' 338 WHERE user_id = '.$user_id.' 339 ;'; 340 pwg_query($query); 340 341 341 342 // destruction of the group links for this user 342 $query = 'DELETE FROM '.PREFIX_TABLE.'user_group'; 343 $query.= ' WHERE user_id = '.$user_id; 344 $query.= ';'; 345 pwg_query( $query ); 343 $query = ' 344 DELETE FROM '.USER_GROUP_TABLE.' 345 WHERE user_id = '.$user_id.' 346 ;'; 347 pwg_query($query); 346 348 347 349 // destruction of the favorites associated with the user 348 $query = 'DELETE FROM '.PREFIX_TABLE.'favorites'; 349 $query.= ' WHERE user_id = '.$user_id; 350 $query.= ';'; 351 pwg_query( $query ); 350 $query = ' 351 DELETE FROM '.FAVORITES_TABLE.' 352 WHERE user_id = '.$user_id.' 353 ;'; 354 pwg_query($query); 352 355 353 356 // destruction of the sessions linked with the user 354 $query = 'DELETE FROM '.PREFIX_TABLE.'sessions'; 355 $query.= ' WHERE user_id = '.$user_id; 356 $query.= ';'; 357 pwg_query( $query ); 357 $query = ' 358 DELETE FROM '.SESSIONS_TABLE.' 359 WHERE user_id = '.$user_id.' 360 ;'; 361 pwg_query($query); 358 362 359 363 // destruction of the user 360 $query = 'DELETE FROM '.USERS_TABLE; 361 $query.= ' WHERE id = '.$user_id; 362 $query.= ';'; 363 pwg_query( $query ); 364 $query = ' 365 DELETE FROM '.USERS_TABLE.' 366 WHERE id = '.$user_id.' 367 ;'; 368 pwg_query($query); 364 369 } 365 370 -
trunk/admin/include/isadmin.inc.php
r593 r650 28 28 include( PHPWG_ROOT_PATH.'admin/include/functions.php' ); 29 29 30 $isadmin = true; 31 if ( $user['status'] != 'admin' ) 30 if ($user['status'] != 'admin') 32 31 { 33 32 echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />';
Note: See TracChangeset
for help on using the changeset viewer.