Location: PHPKode > scripts > UserAction > useraction/UserManager.php
<?php
class UserManager {

	private static $instance = 0;
	private $username = "";
	private $pasword = "";

	public static function getInstance($username, $password) {
		if (UserManager::$instance == 0) {
			UserManager::$instance = new UserManager($username, $password);
		}

		return UserManager::$instance;
	}

	/**
	 * creates a new UserManager object.
	 *
	 * @access protected
	 */
	private function __construct($username, $password) {
		$this->username = $username;
		$this->password = $password;
	}

	public function userLogin () {
		require_once('MySQLWrapper/QueryManager.php');
		$queryManager = QueryManager::getInstance();
		$encryptPassword = md5($this->password);
		$result = $queryManager->selectAllFromTable("user", "username='$this->username' and password='$encryptPassword'");
			
		return $result;
	}
}?>
Return current item: UserAction