From c13689813e71413f3c98664568c47c167c00580a Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 10 May 2011 15:23:58 +0200 Subject: prepare user interface to register and delete client certificates on the profile page --- www/profile.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'www/profile.php') diff --git a/www/profile.php b/www/profile.php index 446c089..5ffc959 100644 --- a/www/profile.php +++ b/www/profile.php @@ -119,11 +119,16 @@ if (!$userservice->isLoggedOn() || $currentUser->getId() != $userid) { $_SESSION['token_stamp'] = time(); $templatename = 'editprofile.tpl.php'; - $tplVars['formaction'] = createURL('profile', $user); - $tplVars['token'] = $_SESSION['token']; - $tplVars['sslClientCerts'] = SemanticScuttle_Service_Factory::get( - 'User_SslClientCert' - )->getUserCerts($currentUser->getId()); + + $tplVars['formaction'] = createURL('profile', $user); + $tplVars['token'] = $_SESSION['token']; + + $scert = SemanticScuttle_Service_Factory::get('User_SslClientCert'); + $tplVars['sslClientCerts'] = $scert->getUserCerts($currentUser->getId()); + $tplVars['currentCert'] = null; + if ($scert->hasValidCert()) { + $tplVars['currentCert'] = SemanticScuttle_Model_User_SslClientCert::fromCurrentCert(); + } } $tplVars['objectUser'] = $userinfo; -- cgit v1.2.3-54-g00ecf