Added the upload of the SSH key for the end user.

This commit is contained in:
Loic d'Anterroches
2009-01-14 23:05:52 +01:00
parent 7f32c6f377
commit 419601bb92
9 changed files with 257 additions and 9 deletions

View File

@@ -124,10 +124,17 @@ class IDF_Views_User
unset($data['password']);
$form = new IDF_Form_UserAccount($data, $params);
}
$keys = $request->user->get_idf_key_list();
if ($keys->count() > 0 and strlen($keys[0]->content) > 30) {
$ssh_key = Pluf_Template::markSafe('<span class="mono">'.Pluf_esc(substr($keys[0]->content, 0, 30)).'...</span><br /><span class="helptext">'.__('Troncated for security reasons.').'</span>');
} else {
$ssh_key = __('You have not upload your public SSH key yet.');
}
return Pluf_Shortcuts_RenderToResponse('idf/user/myaccount.html',
array('page_title' => __('Your Account'),
'api_key' => $api_key,
'ext_pass' => $ext_pass,
'ssh_key' => $ssh_key,
'form' => $form),
$request);
}