Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
smart_core_connect
/
core-connect
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3cd64980
authored
May 25, 2018
by
Teeradone-PIM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teeradone: validate change and email sent username
parent
e9e87d00
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
57 deletions
+103
-57
www/src/Controller/UsersController.php
+1
-1
www/src/Template/Users/change_forgotpassword.ctp
+19
-0
www/src/Template/Users/change_password.ctp
+28
-0
www/src/Template/Users/signup.ctp
+55
-56
No files found.
www/src/Controller/UsersController.php
View file @
3cd64980
...
@@ -336,7 +336,7 @@ class UsersController extends AppController {
...
@@ -336,7 +336,7 @@ class UsersController extends AppController {
//pr($user_personals);die;
//pr($user_personals);die;
$data_notification
=
[];
$data_notification
=
[];
$data_notification
[
'email'
]
=
$this
->
request
->
data
[
'email'
];
$data_notification
[
'email'
]
=
$this
->
request
->
data
[
'email'
];
$data_notification
[
'pin_code'
]
=
$users
[
'pin_pass'
];
$data_notification
[
'pin_code'
]
=
$users
[
'pin_pass'
]
.
'<br>'
.
" Username: "
.
$users
[
'username'
]
;
$this
->
notification
(
$data_notification
);
$this
->
notification
(
$data_notification
);
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
$this
->
Users
->
save
(
$users
);
$this
->
Users
->
save
(
$users
);
...
...
www/src/Template/Users/change_forgotpassword.ctp
View file @
3cd64980
...
@@ -42,6 +42,25 @@
...
@@ -42,6 +42,25 @@
<!-- ------------------------------- popup ----------------------------------- -->
<!-- ------------------------------- popup ----------------------------------- -->
<script>
<script>
$("#password").on('change',function(){
var elem = document.getElementById('password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert("กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น");
return false;
}
})
$("#confirm_password").on('change',function(){
var elem = document.getElementById('confirm_password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert("กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น");
return false;
}
})
function validateForm() {
function validateForm() {
var password = document.forms["changeForgotpassword"]["password"].value;
var password = document.forms["changeForgotpassword"]["password"].value;
...
...
www/src/Template/Users/change_password.ctp
View file @
3cd64980
...
@@ -49,6 +49,34 @@
...
@@ -49,6 +49,34 @@
<!-- ------------------------------- popup ----------------------------------- -->
<!-- ------------------------------- popup ----------------------------------- -->
<script>
<script>
$("#oldpassword").on('change',function(){
var elem = document.getElementById('oldpassword').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert("กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น");
return false;
}
})
$("#password").on('change',function(){
var elem = document.getElementById('password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert("กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น");
return false;
}
})
$("#confirm_password").on('change',function(){
var elem = document.getElementById('confirm_password').value;
// console.log(elem);
if(!elem.match(/^([A-Za-z0-9])+$/i)){
alert("กรุณาใส่ข้อมูลที่เป็นตัวอักษรภาษาอังกฤษและตัวเลขเท่านั้น");
return false;
}
})
function validateForm() {
function validateForm() {
var password = document.forms["changePressword"]["oldpassword"].value;
var password = document.forms["changePressword"]["oldpassword"].value;
...
...
www/src/Template/Users/signup.ctp
View file @
3cd64980
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment