feat: add user information to settings
This commit is contained in:
parent
7c4c0c7ceb
commit
39bd51a49e
2
main
2
main
|
@ -654,7 +654,7 @@ def settings():
|
|||
userCookie = get_session(usersession)
|
||||
user = get_user(userCookie["id"])
|
||||
|
||||
return render_template("settings.html", userdata=user)
|
||||
return render_template("settings.html", userdata=user, createddate=datetime.datetime.utcfromtimestamp(int(str(user["created"]).split(".")[0])).strftime("%Y-%m-%d %H:%m:%S"))
|
||||
else:
|
||||
return redirect("/")
|
||||
|
||||
|
|
|
@ -25,16 +25,16 @@
|
|||
</div>
|
||||
|
||||
<div class="postDiv">
|
||||
<div class="post">
|
||||
{% if userdata.administrator == 1 %}
|
||||
Administrator<br><br>
|
||||
{% endif %}
|
||||
Logged in as {{ userdata.username }}
|
||||
<br><br>
|
||||
<a href="/@{{ userdata.username }}">View my public profile</a><br>
|
||||
<a href="/settings/logout">Log out</a>
|
||||
</div>
|
||||
<div class="post">
|
||||
<h3>Account</h3>
|
||||
<p>Account Type: {% if userdata.administrator == 1 %}Administrator{% else %}Normal{% endif %}<br>
|
||||
Username: {{ userdata.username }}<br>
|
||||
User ID: {{ userdata.id }}<br>
|
||||
Created on: {{ createddate }}</p>
|
||||
<br>
|
||||
<a href="/@{{ userdata.username }}">View my public profile</a><br>
|
||||
<a href="/settings/logout">Log out</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue