Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e42bce8c
authored
2010-11-19 15:25:30 +0000
by
Kevin Burton
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added additional params for the activate method, allowing to validate against password if needed.
1 parent
d7ce04a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
com/Auth/Auth.php
com/Auth/Auth.php
View file @
e42bce8
...
...
@@ -163,7 +163,7 @@ function register($username, $email, $password, $meta = Array()) {
* @global $wpdb
* @see wpmu_activate_signup
*/
function
activate
(
$key
)
{
function
activate
(
$key
,
$validate_against_password
=
false
,
$pass
=
''
)
{
global
$wpdb
,
$current_blog
;
$signup
=
$wpdb
->
get_row
(
$wpdb
->
prepare
(
"SELECT * FROM
{
$wpdb
->
signups
}
WHERE activation_key = %s"
,
$key
));
...
...
@@ -179,6 +179,15 @@ function activate($key) {
// Do I need to re-sanatize this?
$meta
=
unserialize
(
$signup
->
meta
);
if
(
$validate_against_password
)
{
if
(
$meta
[
'password'
]
!=
$pass
)
{
throw
new
Exception
(
'Bad password match'
);
}
}
$id
=
_create_user
(
$signup
->
user_login
,
$meta
[
'password'
],
$signup
->
user_email
);
unset
(
$meta
[
'password'
]);
...
...
Please
register
or
sign in
to post a comment