Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
vtigercrm
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Welcome to Vtiger Community. To gain access for account, please contact [ community @ vtiger.com ]
Show more breadcrumbs
Madhuk
vtigercrm
Commits
2ceb39f9
Commit
2ceb39f9
authored
9 years ago
by
Prasad
Browse files
Options
Downloads
Patches
Plain Diff
Added cryptmode flag to portalinfo table.
parent
6705ece4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/Contacts/ContactsHandler.php
+4
-4
4 additions, 4 deletions
modules/Contacts/ContactsHandler.php
modules/Migration/schema/640_to_650.php
+6
-7
6 additions, 7 deletions
modules/Migration/schema/640_to_650.php
schema/DatabaseSchema.xml
+1
-0
1 addition, 0 deletions
schema/DatabaseSchema.xml
with
11 additions
and
11 deletions
modules/Contacts/ContactsHandler.php
+
4
−
4
View file @
2ceb39f9
...
...
@@ -42,13 +42,13 @@ function Contacts_sendCustomerPortalLoginDetails($entityData){
$password
=
makeRandomPassword
();
$md5_password
=
md5
(
$password
);
if
(
$insert
==
true
)
{
$sql
=
"INSERT INTO vtiger_portalinfo(id,user_name,user_password,type,isactive) VALUES(?,?,?,?,?)"
;
$params
=
array
(
$entityId
,
$email
,
$md5_password
,
'C'
,
1
);
$sql
=
"INSERT INTO vtiger_portalinfo(id,user_name,user_password,
cryptmode,
type,isactive) VALUES(?,?,?,?,?)"
;
$params
=
array
(
$entityId
,
$email
,
$md5_password
,
'MD5'
,
'C'
,
1
);
$adb
->
pquery
(
$sql
,
$params
);
}
if
(
$update
==
true
&&
$portalChanged
==
true
)
{
$sql
=
"UPDATE vtiger_portalinfo SET user_password=? WHERE id=?"
;
$params
=
array
(
$md5_password
,
$entityId
);
$sql
=
"UPDATE vtiger_portalinfo SET user_password=?
, cryptmode=?
WHERE id=?"
;
$params
=
array
(
$md5_password
,
'MD5'
,
$entityId
);
$adb
->
pquery
(
$sql
,
$params
);
}
if
((
$insert
==
true
||
(
$update
=
true
&&
$portalChanged
==
true
))
&&
$entityData
->
get
(
'emailoptout'
)
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/Migration/schema/640_to_650.php
+
6
−
7
View file @
2ceb39f9
...
...
@@ -11,14 +11,13 @@
if
(
defined
(
'VTIGER_UPGRADE'
))
{
//Start add new currency - 'CFP Franc or Pacific Franc'
global
$db
;
global
$adb
;
Vtiger_Utils
::
AddColumn
(
'vtiger_portalinfo'
,
'cryptmode'
,
'varchar(20)'
);
//Updating existing users password to thier md5 hash
$updateQuery
=
"UPDATE vtiger_portalinfo SET user_password=MD5(user_password),cryptmode='MD5' WHERE cryptmode is null"
;
$adb
->
pquery
(
$updateQuery
,
array
());
$selectQuery
=
'SELECT 1 FROM vtiger_portalinfo'
;
$resultSet
=
$db
->
pquery
(
$selectQuery
,
array
());
if
(
$db
->
num_rows
(
$resultSet
)
>
0
)
{
$updateQuery
=
'UPDATE vtiger_portalinfo SET user_password=MD5(user_password)'
;
$db
->
pquery
(
$updateQuery
,
array
());
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
schema/DatabaseSchema.xml
+
1
−
0
View file @
2ceb39f9
...
...
@@ -587,6 +587,7 @@
<field
name=
"user_name"
type=
"C"
size=
"50"
/>
<field
name=
"user_password"
type=
"C"
size=
"30"
/>
<field
name=
"type"
type=
"C"
size=
"5"
/>
<field
name=
"cryptmode"
type=
"C"
size=
"20"
/>
<field
name=
"last_login_time"
type=
"T"
/>
<field
name=
"login_time"
type=
"T"
/>
<field
name=
"logout_time"
type=
"T"
/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment