mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-12 23:17:02 +02:00
added imap restore to inbox feature
This commit is contained in:
@ -50,6 +50,23 @@ class ModelMailMail extends Model {
|
||||
return $ok;
|
||||
}
|
||||
|
||||
|
||||
public function connect_imap() {
|
||||
$this->imap = new Zend_Mail_Protocol_Imap(IMAP_HOST, IMAP_PORT, IMAP_SSL);
|
||||
|
||||
if($this->imap) {
|
||||
if($this->imap->login($_SESSION['username'], $_SESSION['password'])) { return 1; }
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public function disconnect_imap() {
|
||||
$this->imap->logout;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -178,6 +178,8 @@ class ModelUserAuth extends Model {
|
||||
|
||||
$this->add_session_vars($username, $username, array($username));
|
||||
|
||||
$_SESSION['password'] = $password;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user