Changeset 786 for bureau/class/m_admin.php
- Timestamp:
- 02/22/06 03:41:59 (7 years ago)
- File:
-
- 1 edited
-
bureau/class/m_admin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bureau/class/m_admin.php
r695 r786 1 1 <?php 2 2 /* 3 $Id: m_admin.php,v 1.1 1 2005/05/27 22:13:29 arnaud-lbExp $3 $Id: m_admin.php,v 1.12 2005/12/17 17:12:07 benjamin Exp $ 4 4 ---------------------------------------------------------------------- 5 5 LICENSE … … 339 339 /* ----------------------------------------------------------------- */ 340 340 /** 341 * Lock an account 342 * 343 * Lock an account and prevent the user to access its account. 344 * 345 * @param $uid integer the uid number of the account we want to lock 346 * @return boolean Returns FALSE if an error occurs, TRUE if not. 347 */ 348 function lock_mem($uid) { 349 global $err,$db; 350 $err->log("admin","lock_mem",$uid); 351 if (!$this->enabled) { 352 $err->raise("admin",1); 353 return false; 354 } 355 $db=new DB_System(); 356 if ($db->query("UPDATE membres SET enabled='0' WHERE uid='$uid';")) { 357 return true; 358 } 359 else { 360 $err->raise("admin",2); 361 return false; 362 } 363 } 364 365 366 /* ----------------------------------------------------------------- */ 367 /** 368 * UnLock an account 369 * 370 * UnLock an account and prevent the user to access its account. 371 * 372 * @param $uid integer the uid number of the account we want to unlock 373 * @return boolean Returns FALSE if an error occurs, TRUE if not. 374 */ 375 function unlock_mem($uid) { 376 global $err,$db; 377 $err->log("admin","lock_mem",$uid); 378 if (!$this->enabled) { 379 $err->raise("admin",1); 380 return false; 381 } 382 $db=new DB_System(); 383 if ($db->query("UPDATE membres SET enabled='1' WHERE uid='$uid';")) { 384 return true; 385 } 386 else { 387 $err->raise("admin",2); 388 return false; 389 } 390 } 391 392 393 394 /* ----------------------------------------------------------------- */ 395 /** 341 396 * Deletes an account 342 397 *
Note: See TracChangeset
for help on using the changeset viewer.
