blob: feb59a3713bfb07d81964ea7dee6caf3985b10f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
<%- include('partials/header.ejs') %> <%- include('partials/sidebar.ejs') %>
<div class="main">
<h1>My Account</h1>
<p>You can change account settings for <strong><%= user.username %></strong> here. If you wish to have additional support, please contact me at <a href="mailto:[email protected]?subject=[URGENT]%20Support%20Request%20for%20<%= user.username %>">[email protected]</a>. Please take care of the following points before you submit your support request:</p>
<ul>
<li>Please do not edit the subject line.</li>
<li>As an individual monitoring this email, I request you to refrain yourself from spamming.</li>
<li>Please do not include any sensitive information (like credit card numbers, passwords, etc.) in the email.</li>
<li>Allow me upto 48 hours to respond to your support request.</li>
<li>Do not send multiple support requests.</li>
<li>Please note that this is a support request related to your account. Please do not file any bugs here. If you have noticed a bug, please report it to the <a href="https://github.com/luciferreeves/thatcomputerscientist/issues">GitHub Issues</a> page.</li>
</ul>
<p>Your avatar is fetched from gravatar. Update your gravatar email to fetch the avatar. If you don't have an account, you can sign up for one <a href="https://en.gravatar.com/" target="_blank">here</a>. If you haven't set up your gravatar email, we would try to fetch your profile picture from your account email, by default. If your account email and gravatar email are the same, you do not need to set a gravatar email.</p>
<% if (user.url !== "") { %>
<p>Your account is publicly accessible at: <a href="<%= user.url %>"><%= user.url %></a>.</p>
<% } %>
<div class="account">
<div class="ac-sidebar">
<fieldset>
<legend>Avatar</legend>
<img src="https://www.gravatar.com/avatar/<%= user.avatar %>?s=200" alt="<%= user.username %>'s avatar" width="200" height="200"/>
</fieldset>
<form method="post" action="/auth/changePassword">
<fieldset>
<legend>Change Password</legend>
<label for="password">Current Password</label>
<input type="password" name="password" id="password" placeholder="Current Password" />
<label for="new_password">New Password</label>
<input type="password" name="new_password" id="new_password" placeholder="New Password" />
<input type="submit" value="Change Password" />
<% if (locals.messages.passchangesuccess) { %>
<p class="success"><%= messages.passchangesuccess %></p>
<% } %>
<% if (locals.messages.passchangeerror) { %>
<p class="error"><%= messages.passchangeerror %></p>
<% } %>
</fieldset>
</form>
<form method="post" onsubmit="event.preventDefault();">
<fieldset>
<legend class="error">Delete Account</legend>
<input type="submit" value="Delete Account" />
</fieldset>
</form>
</div>
<div class="ac-main">
<form method="post" action="/account/updateAccount">
<fieldset>
<legend>Account Details</legend>
<label for="firstname">First Name</label>
<input type="text" name="firstname" id="firstname" value="<%= user.firstname %>" placeholder="First Name" />
<label for="lastname">Last Name</label>
<input type="text" name="lastname" id="lastname" value="<%= user.lastname %>" placeholder="Last Name" />
<label for="gravatarEmail">Gravatar Email</label>
<input type="text" name="gravatarEmail" id="gravatarEmail" value="<%= user.gravatarEmail %>" placeholder="Gravatar Email" />
<label for="location">Location</label>
<input type="text" name="location" id="location" value="<%= user.location %>" placeholder="Location" />
<label for="bio">Bio</label>
<textarea name="bio" id="bio" placeholder="Bio"><%= user.bio %></textarea>
<label for="isPublic">Account Visibility</label>
<select name="isPublic" id="isPublic">
<option value="0" <% if (user.public == 0) { %>selected="selected"<% } %>>Private</option>
<option value="1" <% if (user.public == 1) { %>selected="selected"<% } %>>Public</option>
</select>
<% if (user.public == 1) { %>
<label for="emailPublic">Email Visibility</label>
<select name="emailPublic" id="emailPublic">
<option value="0" <% if (user.emailPublic == 0) { %>selected="selected"<% } %>>Private</option>
<option value="1" <% if (user.emailPublic == 1) { %>selected="selected"<% } %>>Public</option>
</select>
<% } %>
<input type="submit" value="Update Account" />
<% if (locals.messages.updateaccsuccess) { %>
<p class="success"><%= messages.updateaccsuccess %></p>
<% } %>
<% if (locals.messages.updateaccerror) { %>
<p class="error"><%= messages.updateaccerror %></p>
<% } %>
</fieldset>
</form>
<form method="post" action="/account/sendVerificationEmail">
<fieldset>
<legend>Change Email</legend>
<label for="email">Your current registered email is <em><u><%= user.email %></u></em>. Please note that a verification email will be sent to the new email address in order to update the current email address. Please provide the new email address in the box below:</label>
<input type="email" name="email" id="email" placeholder="New Email" />
<input type="submit" value="Change Email" />
<% if (locals.messages.mailsenderror) { %>
<p class="error"><%= messages.mailsenderror %></p>
<% } %>
<% if (locals.messages.mailsendsuccess) { %>
<p class="success"><%= messages.mailsendsuccess %></p>
<% } %>
</fieldset>
</form>
</div>
</div>
</div>
<script>
if (document.getElementById('accountURL')) {
document.getElementById('accountURL').innerHTML = window.location.origin + '/profile/<%= user.username %>';
}
</script>
<%- include('partials/footer.ejs') %>
|