diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-05-10 15:23:58 +0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-05-10 15:23:58 +0200 |
commit | c13689813e71413f3c98664568c47c167c00580a (patch) | |
tree | 1dc202379157c1c5926d251b13a148238db249fc /www | |
parent | 967ba79ece58dd0164accbf46078964c58fec230 (diff) | |
download | semanticscuttle-c13689813e71413f3c98664568c47c167c00580a.tar.gz semanticscuttle-c13689813e71413f3c98664568c47c167c00580a.tar.bz2 |
prepare user interface to register and delete client certificates on the profile page
Diffstat (limited to 'www')
-rw-r--r-- | www/profile.php | 15 |
1 files changed, 10 insertions, 5 deletions
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; |