public function checkPasswords() { if (DEBUG) { echo "SetPasswordWindow::checkPasswords()\n"; } $password1 = $this->passwordEntry1->get_text(); $password2 = $this->passwordEntry2->get_text(); if (empty($password1)) { if (DEBUG) { echo "SetPasswordWidnwo::checkPasswords() :: Password Field 1 is Empty!\n"; } $this->passwordEntry1->grab_focus(); } elseif (empty($password2)) { if (DEBUG) { echo "SetPasswordWidnwo::checkPasswords() :: Password Field 2 is Empty!\n"; } $this->passwordEntry2->grab_focus(); } elseif ($password1 != $password2) { if (DEBUG) { echo "SetPasswordWidnwo::checkPasswords() :: Passwords Do Not Match!\n"; } $this->messageLabel->set_markup($this->strings['passwordsDoNotMatch']); $this->passwordEntry1->set_text(''); $this->passwordEntry2->set_text(''); $this->passwordEntry1->grab_focus(); } else { ## Passwords match, Huzzah!!! if (DEBUG) { echo "SetPasswordWidnwo::checkPasswords() :: Passwords Match! Updating Database.\n"; } $db = new DBInterface(); $db->setPassword($this->username, $password1); $this->destroy(); } }