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
bb4975b4
authored
2010-11-22 17:01:39 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fix for password validation
1 parent
e51f3767
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
com/Auth/Auth.php
com/Auth/Auth.php
View file @
bb4975b
...
...
@@ -168,7 +168,7 @@ function register($username, $email, $password, $meta = Array()) {
* @global $wpdb
* @see wpmu_activate_signup
*/
function
activate
(
$key
,
$
validate_against_password
=
false
,
$pass
=
''
)
{
function
activate
(
$key
,
$
password_validation
=
null
)
{
global
$wpdb
,
$current_blog
;
$signup
=
$wpdb
->
get_row
(
$wpdb
->
prepare
(
"SELECT * FROM
{
$wpdb
->
signups
}
WHERE activation_key = %s"
,
$key
));
...
...
@@ -185,14 +185,12 @@ function activate($key, $validate_against_password = false, $pass = '') {
// Do I need to re-sanatize this?
$meta
=
unserialize
(
$signup
->
meta
);
if
(
$validate_against_password
)
{
if
(
$meta
[
'password'
]
!=
$pass
)
{
if
(
!
is_null
(
$password_validation
))
{
if
(
$meta
[
'password'
]
!=
$password_validation
)
{
throw
new
Exception
(
'Bad password match'
);
}
}
$id
=
_create_user
(
$signup
->
user_login
,
$meta
[
'password'
],
$signup
->
user_email
);
unset
(
$meta
[
'password'
]);
...
...
@@ -208,12 +206,11 @@ function activate($key, $validate_against_password = false, $pass = '') {
//add_new_user_to_blog( $id, $user_email, $meta );
//do_action(ACTION_ACTIVATE, $id, $password, $meta);
//
KB001:
If more than the password was sent in meta, have it generate user_meta for each key=>val pair
// If more than the password was sent in meta, have it generate user_meta for each key=>val pair
foreach
(
$meta
as
$key
=>
$val
)
{
update_user_meta
(
$id
,
$key
,
$val
);
}
return
(
int
)
$id
;
}
...
...
Please
register
or
sign in
to post a comment