FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
phpbb/phpBB/develop/update_email_hash.php at develop · phpbb-es/phpbb · GitHub
phpbb-es
/
phpbb
Public
forked from
phpbb/phpbb
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
phpbb
/
phpBB
/
develop
/
update_email_hash.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
56 lines (44 loc) · 1.25 KB
Breadcrumbs
phpbb
/
phpBB
/
develop
/
update_email_hash.php
Copy path
File metadata and controls
56 lines (44 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
/**
* Corrects user_email_hash values if DB moved from 32-bit system to 64-bit system or vice versa.
* The CRC32 function in PHP generates different results for both systems.
* @PHP dev team: no, a hexdec() applied to it does not solve the issue. And please document it.
*
*/
die
(
"
Please read the first lines of this script for instructions on how to enable it
"
);
set_time_limit
(
0
);
define
(
'
IN_PHPBB
'
,
true
);
$
phpbb_root_path
=
'
./../
'
;
$
phpEx
=
substr
(
strrchr
(
__FILE__
,
'
.
'
),
1
);
include
(
$
phpbb_root_path
.
'
common.
'
.
$
phpEx
);
// Start session management
$
user
->
session_begin
();
$
auth
->
acl
(
$
user
->
data
);
$
user
->
setup
();
$
start
=
$
request
->
variable
(
'
start
'
,
0
);
$
num_items
=
1000
;
echo
'
<br />Updating user email hashes
'
.
"\n"
;
$
sql
=
'
SELECT user_id, user_email
FROM
'
.
USERS_TABLE
.
'
ORDER BY user_id ASC
'
;
$
result
=
$
db
->
sql_query
(
$
sql
);
$
echos
=
0
;
while
(
$
row
=
$
db
->
sql_fetchrow
(
$
result
))
{
$
echos
++;
$
sql
=
'
UPDATE
'
.
USERS_TABLE
.
"
SET user_email_hash = '
"
.
$
db
->
sql_escape
(
phpbb_email_hash
(
$
row
[
'
user_email
'
])) .
"
'
WHERE user_id =
"
. (
int
)
$
row
[
'
user_id
'
];
$
db
->
sql_query
(
$
sql
);
if
(
$
echos
==
200
)
{
echo
'
<br />
'
;
$
echos
=
0
;
}
echo
'
.
'
;
flush
();
}
$
db
->
sql_freeresult
(
$
result
);
echo
'
FINISHED
'
;
// Done
$
db
->
sql_close
();
Back
|
FazBrowse Home
|
New Git URL