| @@ 105-120 (lines=16) @@ | ||
| 102 | */ |
|
| 103 | $this->common_passwords = apply_filters( 'jetpack_password_checker_restricted_strings', array() ); |
|
| 104 | ||
| 105 | if ( is_null( $user ) ) { |
|
| 106 | $this->user_id = get_current_user_id(); |
|
| 107 | } elseif ( is_object( $user ) && isset( $user->ID ) ) { |
|
| 108 | ||
| 109 | // Existing user, using their ID. |
|
| 110 | $this->user_id = $user->ID; |
|
| 111 | ||
| 112 | } elseif ( is_object( $user ) ) { |
|
| 113 | ||
| 114 | // Newly created user, using existing data. |
|
| 115 | $this->user = $user; |
|
| 116 | $this->user_id = 'new_user'; |
|
| 117 | ||
| 118 | } else { |
|
| 119 | $this->user_id = $user; |
|
| 120 | } |
|
| 121 | ||
| 122 | /** |
|
| 123 | * Filter for the minimum password length. |
|
| @@ 104-119 (lines=16) @@ | ||
| 101 | */ |
|
| 102 | $this->common_passwords = apply_filters( 'jetpack_password_checker_restricted_strings', array() ); |
|
| 103 | ||
| 104 | if ( is_null( $user ) ) { |
|
| 105 | $this->user_id = get_current_user_id(); |
|
| 106 | } elseif ( is_object( $user ) && isset( $user->ID ) ) { |
|
| 107 | ||
| 108 | // Existing user, using their ID. |
|
| 109 | $this->user_id = $user->ID; |
|
| 110 | ||
| 111 | } elseif ( is_object( $user ) ) { |
|
| 112 | ||
| 113 | // Newly created user, using existing data. |
|
| 114 | $this->user = $user; |
|
| 115 | $this->user_id = 'new_user'; |
|
| 116 | ||
| 117 | } else { |
|
| 118 | $this->user_id = $user; |
|
| 119 | } |
|
| 120 | $this->min_password_length = apply_filters( 'better_password_min_length', $this->min_password_length ); |
|
| 121 | } |
|
| 122 | ||