even more fixes, seems to work now => validate more email addresses per account
This commit is contained in:
parent
ea4c410936
commit
423dbd13ee
3 changed files with 66 additions and 10 deletions
57
manager/application/configs/application.ini.ca-mgr1
Normal file
57
manager/application/configs/application.ini.ca-mgr1
Normal file
|
@ -0,0 +1,57 @@
|
|||
[production]
|
||||
phpSettings.display_startup_errors = 1
|
||||
phpSettings.display_errors = 1
|
||||
includePaths.library = LIBRARY_PATH
|
||||
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
|
||||
bootstrap.class = "Bootstrap"
|
||||
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
|
||||
resources.frontController.noViewRenderer = 0
|
||||
resources.frontController.noErrorHandler = 0
|
||||
resources.frontController.useDefaultControllerAlways = 0
|
||||
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
|
||||
resources.view[] =
|
||||
autoloadernamespaces.0 = "CAcert_"
|
||||
|
||||
; Database settings for Session DB
|
||||
ca_mgr.db.session.pdo = "Pdo_Mysql"
|
||||
ca_mgr.db.session.autocleanup = 1
|
||||
ca_mgr.db.session.host = "localhost"
|
||||
ca_mgr.db.session.username = "ca_mgr"
|
||||
ca_mgr.db.session.password = "jsdfhsd47534hsdf7"
|
||||
ca_mgr.db.session.dbname = "ca_mgr"
|
||||
|
||||
; Database settings for Auth DB (CACert User Table)
|
||||
ca_mgr.db.auth.pdo = "Pdo_Mysql"
|
||||
ca_mgr.db.auth.host = "cacert1.it-sls.de"
|
||||
ca_mgr.db.auth.username = "ca_mgr"
|
||||
ca_mgr.db.auth.password = "6348Jhfge(3457H5Kse"
|
||||
ca_mgr.db.auth.dbname = "cacert"
|
||||
ca_mgr.db.auth.tablename = "users"
|
||||
|
||||
; Database settings for Auth DB (Manager User Table)
|
||||
ca_mgr.db.auth2.pdo = "Pdo_Mysql"
|
||||
ca_mgr.db.auth2.host = "localhost"
|
||||
ca_mgr.db.auth2.username = "ca_mgr"
|
||||
ca_mgr.db.auth2.password = "jsdfhsd47534hsdf7"
|
||||
ca_mgr.db.auth2.dbname = "ca_mgr"
|
||||
ca_mgr.db.auth2.tablename = "system_user"
|
||||
|
||||
; Database settings for Config DB (access to system_config and dnssecme data tables)
|
||||
ca_mgr.db.config.pdo = "Pdo_Mysql"
|
||||
ca_mgr.db.config.host = "localhost"
|
||||
ca_mgr.db.config.username = "ca_mgr"
|
||||
ca_mgr.db.config.password = "jsdfhsd47534hsdf7"
|
||||
ca_mgr.db.config.dbname = "ca_mgr"
|
||||
|
||||
; Application name for logger
|
||||
log.application = "web"
|
||||
|
||||
[staging : production]
|
||||
|
||||
[testing : production]
|
||||
phpSettings.display_startup_errors = 1
|
||||
phpSettings.display_errors = 1
|
||||
|
||||
[development : production]
|
||||
phpSettings.display_startup_errors = 1
|
||||
phpSettings.display_errors = 1
|
|
@ -17,10 +17,6 @@ class MailController extends Zend_Controller_Action
|
|||
public function init()
|
||||
{
|
||||
/* Initialize action controller here */
|
||||
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
|
||||
$db2 = Zend_Db::factory($config->ca_mgr->db->auth2->pdo, $config->ca_mgr->db->auth2);
|
||||
Zend_Registry::set('auth2_dbc', $db2);
|
||||
|
||||
$session = Zend_Registry::get('session');
|
||||
$auth = $session->authdata['authed_permissions'];
|
||||
|
||||
|
@ -35,7 +31,9 @@ class MailController extends Zend_Controller_Action
|
|||
'"' . (($action == 'full')?' class="active"':'') . '>' . I18n::_('View all Mails') . '</a>', Zend_View_Helper_Placeholder_Container_Abstract::SET, 2);
|
||||
}
|
||||
|
||||
$emails = new CAcert_User_Emails();
|
||||
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV);
|
||||
$db = Zend_Db::factory($config->ca_mgr->db->auth->pdo, $config->ca_mgr->db->auth);
|
||||
$emails = new CAcert_User_Emails($db);
|
||||
|
||||
$this->addresses = $emails->getEmailAddressesByLogin($session->authdata['authed_username']);
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
|
||||
class CAcert_User_Emails {
|
||||
public function __construct() {
|
||||
Log::Log()->debug(__METHOD__);
|
||||
private $db = null;
|
||||
|
||||
public function __construct($db) {
|
||||
$this->db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,7 +13,7 @@ class CAcert_User_Emails {
|
|||
* @return array
|
||||
*/
|
||||
public function getEmailAddressesByLogin($addr) {
|
||||
$db = Zend_Registry::get('auth2_dbc');
|
||||
$db = $this->db;
|
||||
|
||||
/**
|
||||
* find out user id by email address
|
||||
|
@ -51,7 +53,6 @@ class CAcert_User_Emails {
|
|||
}
|
||||
}
|
||||
|
||||
Log::Log()->debug(__METHOD__ . ' mail addresses ' . var_export($emails, true));
|
||||
return $emails;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue