mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
Display more user info on panel.
This commit is contained in:
parent
55cb583bdd
commit
ce73333a2d
2 changed files with 13 additions and 3 deletions
|
@ -344,9 +344,16 @@ function get_data_for(view)
|
||||||
table.insert(data["app"], { url = url, name = name })
|
table.insert(data["app"], { url = url, name = name })
|
||||||
end
|
end
|
||||||
elseif view == "ynhpanel.json" then
|
elseif view == "ynhpanel.json" then
|
||||||
|
local mails = get_mails(user)
|
||||||
data = {
|
data = {
|
||||||
app = {},
|
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
|
portal_url = portal_url
|
||||||
}
|
}
|
||||||
for url, name in pairs(conf["users"][user]) do
|
for url, name in pairs(conf["users"][user]) do
|
||||||
|
|
|
@ -157,8 +157,11 @@ domReady(function(){
|
||||||
|
|
||||||
// Add overlay header
|
// Add overlay header
|
||||||
overlay.innerHTML += '<div class="header">' +
|
overlay.innerHTML += '<div class="header">' +
|
||||||
'<h1>'+ response.user +'</h1>' +
|
'<h1>'+ response.user.name +' <small>'+ response.user.mail +'</small></h1>' +
|
||||||
'<a class="account-link" href="'+ response.portal_url +'">View my account</a>' +
|
'' +
|
||||||
|
// '<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>' +
|
' | <a class="logout-link" href="'+ response.portal_url +'?action=logout">Logout</a>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue