Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
aa.gusti
/
opensipkd-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6fd58d28
authored
Jun 12, 2026
by
aa.gustiana@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update register dan profile
1 parent
82336762
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
opensipkd/base/views/email-profile-password.tpl
opensipkd/base/views/register.py
opensipkd/base/views/user_login.py
opensipkd/base/views/email-profile-password.tpl
0 → 100644
View file @
6fd58d2
We accepted profile change requests. Please click the following link:
Use this security code: $
{
password
}
as password to save new profile
This security code will expire in $
{
minutes
}
minutes.
If you did not request this, please ignore it.
opensipkd/base/views/register.py
View file @
6fd58d2
...
...
@@ -365,6 +365,16 @@ class Views(BaseView):
super
()
.
form_validator
(
form
,
value
)
def
send_profile_password
(
self
):
user
=
self
.
req
.
user
if
user
and
user
.
external_identities
.
count
()
>
0
:
remain
=
regenerate_security_code
(
user
)
send_email_security_code
(
self
.
req
,
user
,
remain
,
'Request profile change'
,
'email-profile-password'
,
'email-profile-password.tpl'
)
self
.
req
.
session
.
flash
(
"Security code/password update profile sudah dikirimkan ke
%
s"
%
user
.
email
)
def
before_add
(
self
):
result
=
{}
# email = self.req.user and self.req.user.email or ""
...
...
@@ -374,8 +384,11 @@ class Views(BaseView):
result
=
self
.
ses
[
"id_info"
]
result
.
update
(
dict
(
nama
=
" "
.
join
([
result
[
"given_name"
],
result
[
"family_name"
]])))
self
.
send_profile_password
()
# if BASE_CLASS.reg_captcha:
# result.update(dict(captcha=self.req.static_url(BASE_CLASS.captcha_files)))
if
self
.
req
.
is_xhr
:
url
=
self
.
req
.
static_url
(
BASE_CLASS
.
captcha_files
)
kode_captcha
,
file_name
=
widget_os
.
img_captcha
(
self
.
req
)
...
...
@@ -398,7 +411,7 @@ class Views(BaseView):
return
HTTPFound
(
location
=
request
.
route_url
(
"base-profile"
))
self
.
bindings
=
dict
(
user
=
None
)
if
"g_state"
in
self
.
req
.
cookies
:
if
"g_state"
in
self
.
req
.
cookies
and
self
.
req
.
cookies
.
get
(
"g_state"
,
None
)
!=
'{'
:
if
"id_info"
not
in
self
.
ses
or
not
self
.
ses
[
"id_info"
]:
return
HTTPFound
(
location
=
self
.
req
.
route_url
(
"base-login"
))
...
...
@@ -455,9 +468,9 @@ class Views(BaseView):
# def id_not_found(self, **kwargs):
# return
def
get_values
(
self
,
row
,
istime
=
False
):
d
=
super
()
.
get_values
(
row
,
istime
)
self
.
send_profile_password
()
partner
=
DBSession
.
query
(
Partner
)
.
\
filter
(
Partner
.
email
==
self
.
req
.
user
.
email
)
.
first
()
if
partner
:
...
...
opensipkd/base/views/user_login.py
View file @
6fd58d2
...
...
@@ -775,7 +775,7 @@ def send_email_security_code(
request
.
home
,
user
.
security_code
,
password
)
minutes
=
int
(
time_remain
.
seconds
/
60
)
data
=
dict
(
url
=
url
,
minutes
=
minutes
)
data
=
dict
(
url
=
url
,
minutes
=
minutes
,
password
=
user
.
security_code
)
here
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
body_file
=
os
.
path
.
join
(
here
,
body_default_file
)
with
open
(
body_file
)
as
f
:
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment