public function Login($login, $passwd) { $am = new AccountManager(); $this->account = $am->GetAccount($login, $passwd); $am->Free(); if ($this->account == null) { return $this->loginSeccessed = false; } $this->session['account'] = $this->account != null ? serialize($this->account) : null; $this->session['lastVisit'] = time(); $this->isLoggedIn = true; return $this->isLoggedIn; }