Display more user info on panel.

This commit is contained in:
opi 2014-02-19 01:49:35 +01:00
parent 55cb583bdd
commit ce73333a2d
2 changed files with 13 additions and 3 deletions

View file

@ -344,9 +344,16 @@ function get_data_for(view)
table.insert(data["app"], { url = url, name = name })
end
elseif view == "ynhpanel.json" then
local mails = get_mails(user)
data = {
app = {},
user = user,
user = {
uid = user,
name = cache:get(user..'-cn'),
givenName = cache:get(user..'-givenName'),
surname = cache:get(user..'-sn'),
mail = mails['mail']
},
portal_url = portal_url
}
for url, name in pairs(conf["users"][user]) do

View file

@ -157,8 +157,11 @@ domReady(function(){
// Add overlay header
overlay.innerHTML += '<div class="header">' +
'<h1>'+ response.user +'</h1>' +
'<a class="account-link" href="'+ response.portal_url +'">View my account</a>' +
'<h1>'+ response.user.name +' <small>'+ response.user.mail +'</small></h1>' +
'' +
// '<a class="account-link" href="'+ response.portal_url +'">'+ response.user.uid +'</a>' +
'<a class="account-link" href="'+ response.portal_url +'edit.html">Edit</a>' +
' | <a class="logout-link" href="'+ response.portal_url +'password.html">Change password</a>' +
' | <a class="logout-link" href="'+ response.portal_url +'?action=logout">Logout</a>' +
'</div>';