├── .gitmodules
├── .travis.yml
├── LICENSE
├── assets
├── banner-1544x500.png
├── banner-772x250.png
├── banner.psd
├── icon-128x128.png
├── icon-256x256.png
├── icon.psd
├── screenshot-1.png
├── screenshot-2.png
└── screenshot-3.png
├── expire-passwords.php
├── includes
├── class-list-table.php
├── class-login-screen.php
└── class-settings.php
├── languages
├── expire-passwords-cs_CZ.mo
├── expire-passwords-cs_CZ.po
├── expire-passwords-de_DE.mo
├── expire-passwords-de_DE.po
├── expire-passwords-es_ES.mo
├── expire-passwords-es_ES.po
├── expire-passwords.mo
├── expire-passwords.po
└── expire-passwords.pot
├── readme.md
├── readme.txt
└── svn-url
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "dev-lib"]
2 | path = dev-lib
3 | url = https://github.com/xwp/wp-dev-lib.git
4 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 |
3 | language:
4 | - php
5 | - node_js
6 |
7 | php:
8 | - 5.2
9 | - 7.1
10 |
11 | env:
12 | - WP_VERSION=4.0 WP_MULTISITE=0
13 | - WP_VERSION=latest WP_MULTISITE=0
14 | - WP_VERSION=trunk WP_MULTISITE=0
15 |
16 | matrix:
17 | exclude:
18 | - php: 7.1
19 | env: WP_VERSION=4.0 WP_MULTISITE=0
20 |
21 | install:
22 | - export DEV_LIB_PATH=dev-lib
23 | - if [ ! -e "$DEV_LIB_PATH" ] && [ -L .travis.yml ]; then export DEV_LIB_PATH=$( dirname $( readlink .travis.yml ) ); fi
24 | - source $DEV_LIB_PATH/travis.install.sh
25 |
26 | script:
27 | - source $DEV_LIB_PATH/travis.script.sh
28 |
29 | after_script:
30 | - source $DEV_LIB_PATH/travis.after_script.sh
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | {description}
294 | Copyright (C) {year} {fullname}
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License along
307 | with this program; if not, write to the Free Software Foundation, Inc.,
308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309 |
310 | Also add information on how to contact you by electronic and paper mail.
311 |
312 | If the program is interactive, make it output a short notice like this
313 | when it starts in an interactive mode:
314 |
315 | Gnomovision version 69, Copyright (C) year name of author
316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317 | This is free software, and you are welcome to redistribute it
318 | under certain conditions; type `show c' for details.
319 |
320 | The hypothetical commands `show w' and `show c' should show the appropriate
321 | parts of the General Public License. Of course, the commands you use may
322 | be called something other than `show w' and `show c'; they could even be
323 | mouse-clicks or menu items--whatever suits your program.
324 |
325 | You should also get your employer (if you work as a programmer) or your
326 | school, if any, to sign a "copyright disclaimer" for the program, if
327 | necessary. Here is a sample; alter the names:
328 |
329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
331 |
332 | {signature of Ty Coon}, 1 April 1989
333 | Ty Coon, President of Vice
334 |
335 | This General Public License does not permit incorporating your program into
336 | proprietary programs. If your program is a subroutine library, you may
337 | consider it more useful to permit linking proprietary applications with the
338 | library. If this is what you want to do, use the GNU Lesser General
339 | Public License instead of this License.
340 |
341 |
--------------------------------------------------------------------------------
/assets/banner-1544x500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/banner-1544x500.png
--------------------------------------------------------------------------------
/assets/banner-772x250.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/banner-772x250.png
--------------------------------------------------------------------------------
/assets/banner.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/banner.psd
--------------------------------------------------------------------------------
/assets/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/icon-128x128.png
--------------------------------------------------------------------------------
/assets/icon-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/icon-256x256.png
--------------------------------------------------------------------------------
/assets/icon.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/icon.psd
--------------------------------------------------------------------------------
/assets/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/screenshot-1.png
--------------------------------------------------------------------------------
/assets/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/screenshot-2.png
--------------------------------------------------------------------------------
/assets/screenshot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/assets/screenshot-3.png
--------------------------------------------------------------------------------
/expire-passwords.php:
--------------------------------------------------------------------------------
1 | 365 ) ? self::$default_limit : absint( $options['limit'] );
183 |
184 | }
185 |
186 | /**
187 | * Return the array of expirable roles setting.
188 | *
189 | * @return array
190 | */
191 | public static function get_roles() {
192 |
193 | $options = (array) get_option( 'expass_settings', array() );
194 |
195 | if ( ! empty( $options['roles'] ) ) {
196 |
197 | return array_keys( $options['roles'] );
198 |
199 | }
200 |
201 | if ( ! function_exists( 'get_editable_roles' ) ) {
202 |
203 | require_once ABSPATH . 'wp-admin/includes/user.php';
204 |
205 | }
206 |
207 | $roles = array_keys( get_editable_roles() );
208 |
209 | // Return all roles except admins by default if not set
210 | if ( isset( $roles['administrator'] ) ) {
211 |
212 | unset( $roles['administrator'] );
213 |
214 | }
215 |
216 | return $roles;
217 |
218 | }
219 |
220 | /**
221 | * Return the password expiration date for a user.
222 | *
223 | * @param mixed $user (optional)
224 | * @param string $date_format (optional)
225 | *
226 | * @return string|false
227 | */
228 | public static function get_expiration( $user = null, $date_format = 'U' ) {
229 |
230 | if (
231 | ! self::has_expirable_role( $user )
232 | ||
233 | false === ( $reset = self::get_user_meta( $user ) )
234 | ) {
235 |
236 | return false;
237 |
238 | }
239 |
240 | $expires = strtotime( sprintf( '@%d + %d days', $reset, self::get_limit() ) );
241 |
242 | return gmdate( $date_format, $expires );
243 |
244 | }
245 |
246 | /**
247 | * Determine if a user belongs to an expirable role defined in the settings.
248 | *
249 | * @param mixed $user (optional)
250 | *
251 | * @return bool
252 | */
253 | public static function has_expirable_role( $user = null ) {
254 |
255 | if ( false === ( $user_id = self::get_user_id( $user ) ) ) {
256 |
257 | return false;
258 |
259 | }
260 |
261 | $user = get_user_by( 'ID', $user_id );
262 | $roles = array_intersect( $user->roles, self::get_roles() );
263 |
264 | return empty( $user->roles[0] ) ? false : ! empty( $roles );
265 |
266 | }
267 |
268 | /**
269 | * Determine if a user's password has exceeded the age limit.
270 | *
271 | * @param mixed $user (optional)
272 | *
273 | * @return bool
274 | */
275 | public static function is_expired( $user = null ) {
276 |
277 | return ( false === ( $expires = self::get_expiration( $user ) ) ) ? false : ( time() > $expires );
278 |
279 | }
280 |
281 | /**
282 | * Return the user ID for a give user.
283 | *
284 | * @param mixed $user
285 | *
286 | * @return int|false
287 | */
288 | private static function get_user_id( $user = null ) {
289 |
290 | switch ( true ) {
291 |
292 | case is_numeric( $user ) :
293 |
294 | $user_id = absint( $user );
295 |
296 | break;
297 |
298 | case is_a( $user, 'WP_User' ) :
299 |
300 | $user_id = $user->ID;
301 |
302 | break;
303 |
304 | default :
305 |
306 | $user_id = get_current_user_id();
307 |
308 | }
309 |
310 | if ( ! get_user_by( 'ID', $user_id ) ) {
311 |
312 | return false;
313 |
314 | }
315 |
316 | return $user_id;
317 |
318 | }
319 |
320 | }
321 |
322 | Expire_Passwords::instance();
323 |
--------------------------------------------------------------------------------
/includes/class-list-table.php:
--------------------------------------------------------------------------------
1 | id ) || 'users' !== $screen->id ) {
32 |
33 | return;
34 |
35 | }
36 |
37 | ?>
38 |
51 | %s',
106 | esc_attr( $class ),
107 | esc_html( $time_diff )
108 | );
109 |
110 | }
111 |
112 | }
113 |
--------------------------------------------------------------------------------
/includes/class-login-screen.php:
--------------------------------------------------------------------------------
1 | 'lostpassword',
52 | 'expass' => 'expired',
53 | ),
54 | wp_login_url()
55 | ),
56 | 302
57 | );
58 |
59 | exit;
60 |
61 | }
62 |
63 | /**
64 | * Disallow using the same password as before on reset.
65 | *
66 | * @action validate_password_reset
67 | *
68 | * @param WP_Error $errors
69 | * @param WP_User $user
70 | */
71 | public function validate_password_reset( $errors, $user ) {
72 |
73 | $new_pass1 = filter_input( INPUT_POST, 'pass1' );
74 | $new_pass2 = filter_input( INPUT_POST, 'pass2' );
75 |
76 | if (
77 | ! $new_pass1
78 | ||
79 | ! $new_pass2
80 | ||
81 | $new_pass1 !== $new_pass2
82 | ||
83 | ! Expire_Passwords::has_expirable_role( $user )
84 | ) {
85 |
86 | return;
87 |
88 | }
89 |
90 | $is_same = wp_check_password( $new_pass1, $user->data->user_pass, $user->ID );
91 |
92 | if ( $is_same ) {
93 |
94 | $errors->add( 'password_already_used', esc_html__( 'You cannot reuse your old password.' ) );
95 |
96 | }
97 |
98 | }
99 |
100 | /**
101 | * Display a custom message on the lost password login screen.
102 | *
103 | * @filter login_message
104 | *
105 | * @param string $message
106 | *
107 | * @return string
108 | */
109 | public function lost_password_message( $message ) {
110 |
111 | $action = filter_input( INPUT_GET, 'action', FILTER_SANITIZE_STRING );
112 | $status = filter_input( INPUT_GET, 'expass', FILTER_SANITIZE_STRING );
113 |
114 | if ( 'lostpassword' !== $action || 'expired' !== $status ) {
115 |
116 | return $message;
117 |
118 | }
119 |
120 | $limit = Expire_Passwords::get_limit();
121 |
122 | return sprintf(
123 | '
%s
%s
',
124 | sprintf(
125 | _n(
126 | 'Your password must be reset every day.',
127 | 'Your password must be reset every %d days.',
128 | $limit,
129 | 'expire-passwords'
130 | ),
131 | $limit
132 | ),
133 | esc_html__( 'Please enter your username or e-mail below and a password reset link will be sent to you.', 'expire-passwords' )
134 | );
135 |
136 | }
137 |
138 | }
139 |
--------------------------------------------------------------------------------
/includes/class-settings.php:
--------------------------------------------------------------------------------
1 | submenu_page()
44 | */
45 | public function render_submenu_page() {
46 |
47 | ?>
48 |
49 |
50 |
51 |
52 |
63 |
64 |
65 | init()
110 | */
111 | public function render_section() {
112 |
113 | printf(
114 | '
%s
',
115 | esc_html__( 'Require certain users to change their passwords on a regular basis.', 'expire-passwords' )
116 | );
117 |
118 | }
119 |
120 | /**
121 | * Content for the limit setting field.
122 | *
123 | * @see $this->init()
124 | */
125 | public function render_field_limit() {
126 |
127 | $options = (array) get_option( 'expass_settings', array() );
128 | $value = isset( $options['limit'] ) ? $options['limit'] : null;
129 |
130 | printf(
131 | ' %s',
132 | esc_attr( Expire_Passwords::$default_limit ),
133 | esc_attr( $value ),
134 | esc_html__( 'days', 'expire-passwords' )
135 | );
136 |
137 | }
138 |
139 | /**
140 | * Content for the roles setting field.
141 | *
142 | * @see $this->init()
143 | */
144 | public function render_field_roles() {
145 |
146 | $options = (array) get_option( 'expass_settings', array() );
147 | $roles = get_editable_roles();
148 |
149 | foreach ( $roles as $role => $role_data ) {
150 |
151 | $name = sanitize_key( $role );
152 | $value = ( ! $options ) ? ( 'administrator' === $role ? 0 : 1 ) : ( empty( $options['roles'][ $name ] ) ? 0 : 1 );
153 |
154 | printf(
155 | '',
156 | esc_attr( $name ),
157 | checked( $value, 1, false ),
158 | esc_html( $role_data['name'] )
159 | );
160 |
161 | }
162 |
163 | }
164 |
165 | /**
166 | * Plugin review call-to-action text for the admin footer.
167 | *
168 | * @filter admin_footer_text
169 | *
170 | * @param string $text
171 | *
172 | * @return string
173 | */
174 | public function admin_footer_text( $text ) {
175 |
176 | $screen = get_current_screen();
177 |
178 | if ( ! isset( $screen->id ) || 'users_page_expire_passwords' !== $screen->id ) {
179 |
180 | return $text;
181 |
182 | }
183 |
184 | return sprintf(
185 | __( 'Do you like the %1$s plugin? Please consider %2$s on %3$s', 'expire-passwords' ),
186 | esc_html__( 'Expire Passwords', 'expire-passwords' ),
187 | sprintf(
188 | '%s',
189 | esc_url( 'https://wordpress.org/support/view/plugin-reviews/expire-passwords#postform' ),
190 | __( 'leaving a ★★★★★ review', 'expire-passwords' )
191 | ),
192 | sprintf(
193 | 'WordPress.org',
194 | esc_url( 'https://wordpress.org/plugins/expire-passwords/' )
195 | )
196 | );
197 |
198 | }
199 |
200 | }
201 |
--------------------------------------------------------------------------------
/languages/expire-passwords-cs_CZ.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/languages/expire-passwords-cs_CZ.mo
--------------------------------------------------------------------------------
/languages/expire-passwords-cs_CZ.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 Expire Passwords
2 | # This file is distributed under the same license as the Expire Passwords package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Expire Passwords 0.3.0\n"
6 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/expire-passwords\n"
7 | "POT-Creation-Date: 2015-07-09 15:01-0500\n"
8 | "PO-Revision-Date: 2015-07-09 15:03-0500\n"
9 | "Last-Translator: Frankie Jarrett \n"
10 | "Language-Team: \n"
11 | "Language: cs_CZ\n"
12 | "MIME-Version: 1.0\n"
13 | "Content-Type: text/plain; charset=UTF-8\n"
14 | "Content-Transfer-Encoding: 8bit\n"
15 | "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
16 | "X-Generator: Poedit 1.8.2\n"
17 | "X-Poedit-Basepath: .\n"
18 | "X-Poedit-SearchPath-0: ..\n"
19 |
20 | #: expire-passwords.php:228 expire-passwords.php:253 expire-passwords.php:277
21 | msgid "User does not exist."
22 | msgstr "Uživatel neexistuje."
23 |
24 | #: expire-passwords.php:257
25 | msgid "User has no role assigned."
26 | msgstr "Uživatel nemá žádnou roli."
27 |
28 | #: includes/class-list-table.php:69
29 | msgid "Password Reset"
30 | msgstr "Obnovení hesla"
31 |
32 | #: includes/class-list-table.php:92
33 | #, php-format
34 | msgid "%1$s ago"
35 | msgstr "před %1$s"
36 |
37 | #: includes/class-login-screen.php:94
38 | msgid "You cannot reuse your old password."
39 | msgstr "Nelze znovu použít staré heslo."
40 |
41 | #: includes/class-login-screen.php:121
42 | #, fuzzy
43 | msgid "Your password must be reset every day."
44 | msgstr "Každých %d dní je nutné obnovit vaše heslo."
45 |
46 | #: includes/class-login-screen.php:128
47 | msgid ""
48 | "Please enter your username or e-mail below and a password reset link will be "
49 | "sent to you."
50 | msgstr ""
51 | "Zadejte prosím své uživatelské jméno a e-mail níže a odkaz pro obnovení hesla "
52 | "vám bude zaslán."
53 |
54 | #: includes/class-settings.php:39 includes/class-settings.php:40
55 | #: includes/class-settings.php:58 includes/class-settings.php:189
56 | msgid "Expire Passwords"
57 | msgstr "Expire Passwords"
58 |
59 | #: includes/class-settings.php:96
60 | msgid "Require password reset every"
61 | msgstr "Vyžadovat reset hesla každých"
62 |
63 | #: includes/class-settings.php:104
64 | msgid "For users in these roles"
65 | msgstr "Pro uživatele v těchto rolích"
66 |
67 | #: includes/class-settings.php:121
68 | msgid "Require certain users to change their passwords on a regular basis."
69 | msgstr "Vyžadovat na určitých uživatelích pravidelnou změnu hesla."
70 |
71 | #: includes/class-settings.php:139
72 | msgid "days"
73 | msgstr "dní"
74 |
75 | #: includes/class-settings.php:188
76 | #, php-format
77 | msgid "Do you like the %1$s plugin? Please consider %2$s on %3$s"
78 | msgstr ""
79 |
80 | #: includes/class-settings.php:193
81 | msgid "leaving a ★★★★★ review"
82 | msgstr ""
83 |
84 | #~ msgid "Frankie Jarrett"
85 | #~ msgstr "Frankie Jarrett"
86 |
87 | #~ msgid "http://frankiejarrett.com"
88 | #~ msgstr "http://frankiejarrett.com"
89 |
--------------------------------------------------------------------------------
/languages/expire-passwords-de_DE.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/languages/expire-passwords-de_DE.mo
--------------------------------------------------------------------------------
/languages/expire-passwords-de_DE.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 Expire Passwords
2 | # This file is distributed under the same license as the Expire Passwords package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Expire Passwords 0.3.0\n"
6 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/expire-passwords\n"
7 | "POT-Creation-Date: 2017-03-19 19:58+0100\n"
8 | "MIME-Version: 1.0\n"
9 | "Content-Type: text/plain; charset=UTF-8\n"
10 | "Content-Transfer-Encoding: 8bit\n"
11 | "PO-Revision-Date: 2017-03-19 20:18+0100\n"
12 | "Language-Team: \n"
13 | "X-Generator: Poedit 1.8.12\n"
14 | "X-Poedit-Basepath: ..\n"
15 | "X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e;esc_attr__;esc_attr_e;_n;"
16 | "_x;_ex;_nx;esc_attr_x;esc_html_x;_n_noop;_nx_noop\n"
17 | "Last-Translator: \n"
18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19 | "Language: de_DE\n"
20 | "X-Poedit-SearchPath-0: .\n"
21 | "X-Poedit-SearchPathExcluded-0: dev-lib\n"
22 | "X-Poedit-SearchPathExcluded-1: assets\n"
23 | "X-Poedit-SearchPathExcluded-2: languages\n"
24 |
25 | #: expire-passwords.php:228 expire-passwords.php:253 expire-passwords.php:277
26 | msgid "User does not exist."
27 | msgstr "Benutzer existiert nicht."
28 |
29 | #: expire-passwords.php:257
30 | msgid "User has no role assigned."
31 | msgstr "Benutzer ist keiner Gruppe zugeordnet."
32 |
33 | #: includes/class-list-table.php:69
34 | msgid "Password Reset"
35 | msgstr "Passwort zurücksetzen"
36 |
37 | #: includes/class-list-table.php:92
38 | #, php-format
39 | msgid "%1$s ago"
40 | msgstr "Vor %1$s"
41 |
42 | #: includes/class-login-screen.php:94
43 | msgid "You cannot reuse your old password."
44 | msgstr "Ihr altes Passwort kann nicht wiederverwendet werden."
45 |
46 | #: includes/class-login-screen.php:121
47 | msgid "Your password must be reset every day."
48 | msgstr "Ihr Passwort muss jeden Tag zurückgesetzt werden."
49 |
50 | #: includes/class-login-screen.php:128
51 | msgid ""
52 | "Please enter your username or e-mail below and a password reset link will be "
53 | "sent to you."
54 | msgstr ""
55 | "Bitte geben Sie Ihren Benutzernamen oder Ihre E-mail ein, um ein Link zum "
56 | "Zurücksetzen des Kennworts zu erhalten."
57 |
58 | #: includes/class-settings.php:39 includes/class-settings.php:40
59 | #: includes/class-settings.php:58 includes/class-settings.php:189
60 | msgid "Expire Passwords"
61 | msgstr "Ablaufen von Passwörtern"
62 |
63 | #: includes/class-settings.php:96
64 | msgid "Require password reset every"
65 | msgstr "Zurücksetzen des Kennworts erforderlich alle"
66 |
67 | #: includes/class-settings.php:104
68 | msgid "For users in these roles"
69 | msgstr "Für Benutzer dieser Gruppen"
70 |
71 | #: includes/class-settings.php:121
72 | msgid "Require certain users to change their passwords on a regular basis."
73 | msgstr "Benutzer müssen ihr Passwort regelmäßig ändern."
74 |
75 | #: includes/class-settings.php:139
76 | msgid "days"
77 | msgstr "Tage"
78 |
79 | #: includes/class-settings.php:188
80 | #, php-format
81 | msgid "Do you like the %1$s plugin? Please consider %2$s on %3$s"
82 | msgstr "Gefällt Ihnen das %1$s Plugin? Bitte %2$s auf %3$s"
83 |
84 | #: includes/class-settings.php:193
85 | msgid "leaving a ★★★★★ review"
86 | msgstr "bewerten Sie mit ★★★★★ "
87 |
--------------------------------------------------------------------------------
/languages/expire-passwords-es_ES.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/languages/expire-passwords-es_ES.mo
--------------------------------------------------------------------------------
/languages/expire-passwords-es_ES.po:
--------------------------------------------------------------------------------
1 | msgid ""
2 | msgstr ""
3 | "Project-Id-Version: Expire Passwords 0.3.0\n"
4 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/expire-passwords\n"
5 | "POT-Creation-Date: 2015-07-09 14:59-0500\n"
6 | "PO-Revision-Date: 2015-07-09 15:00-0500\n"
7 | "Last-Translator: Frankie Jarrett \n"
8 | "Language-Team: \n"
9 | "Language: es_ES\n"
10 | "MIME-Version: 1.0\n"
11 | "Content-Type: text/plain; charset=UTF-8\n"
12 | "Content-Transfer-Encoding: 8bit\n"
13 | "X-Generator: Poedit 1.8.2\n"
14 | "X-Poedit-Basepath: .\n"
15 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
16 |
17 | #: expire-passwords.php:228 expire-passwords.php:253 expire-passwords.php:277
18 | msgid "User does not exist."
19 | msgstr "El usuario no existe"
20 |
21 | #: expire-passwords.php:257
22 | msgid "User has no role assigned."
23 | msgstr "Usuario no tiene ningún papel asignado."
24 |
25 | #: includes/class-list-table.php:69
26 | msgid "Password Reset"
27 | msgstr "Restablecer contraseña"
28 |
29 | #: includes/class-list-table.php:92
30 | #, php-format
31 | msgid "%1$s ago"
32 | msgstr "Hace %s"
33 |
34 | #: includes/class-login-screen.php:94
35 | msgid "You cannot reuse your old password."
36 | msgstr "Usted no puede reutilizar tu contraseña anterior."
37 |
38 | #: includes/class-login-screen.php:121
39 | msgid "Your password must be reset every day."
40 | msgstr "Su contraseña debe ser reajustada cada día."
41 |
42 | #: includes/class-login-screen.php:128
43 | msgid ""
44 | "Please enter your username or e-mail below and a password reset link will be "
45 | "sent to you."
46 | msgstr ""
47 | "Introduce tu nombre de usuario o correo electrónico abajo y un enlace de "
48 | "restablecimiento de contraseña será enviado a usted."
49 |
50 | #: includes/class-settings.php:39 includes/class-settings.php:40
51 | #: includes/class-settings.php:58 includes/class-settings.php:189
52 | msgid "Expire Passwords"
53 | msgstr "Caducan las contraseñas"
54 |
55 | #: includes/class-settings.php:96
56 | msgid "Require password reset every"
57 | msgstr "Requerir restablecimiento de contraseña cada"
58 |
59 | #: includes/class-settings.php:104
60 | msgid "For users in these roles"
61 | msgstr "Para los usuarios de estos roles"
62 |
63 | #: includes/class-settings.php:121
64 | msgid "Require certain users to change their passwords on a regular basis."
65 | msgstr ""
66 | "Requieren ciertos usuarios cambiar sus contraseñas en una base regular."
67 |
68 | #: includes/class-settings.php:139
69 | msgid "days"
70 | msgstr "dias"
71 |
72 | #: includes/class-settings.php:188
73 | #, php-format
74 | msgid "Do you like the %1$s plugin? Please consider %2$s on %3$s"
75 | msgstr "¿Te gusta el %1$s plugin? Por favor considere %2$s en %3$s"
76 |
77 | #: includes/class-settings.php:193
78 | msgid "leaving a ★★★★★ review"
79 | msgstr "dejando una opinión de ★★★★★"
80 |
81 | #, fuzzy
82 | #~ msgid "Frankie Jarrett"
83 | #~ msgstr "Frankie Jarrett"
84 |
85 | #, fuzzy
86 | #~ msgid "http://frankiejarrett.com"
87 | #~ msgstr "http://frankiejarrett.com"
88 |
--------------------------------------------------------------------------------
/languages/expire-passwords.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/frankiejarrett/expire-passwords/8c4e8a9362851a869b46b9ac73c2b96223e4230e/languages/expire-passwords.mo
--------------------------------------------------------------------------------
/languages/expire-passwords.po:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 Expire Passwords
2 | # This file is distributed under the same license as the Expire Passwords package.
3 | msgid ""
4 | msgstr ""
5 | "Project-Id-Version: Expire Passwords 0.3.0\n"
6 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/expire-passwords\n"
7 | "POT-Creation-Date: 2015-07-09 14:58-0500\n"
8 | "MIME-Version: 1.0\n"
9 | "Content-Type: text/plain; charset=UTF-8\n"
10 | "Content-Transfer-Encoding: 8bit\n"
11 | "PO-Revision-Date: 2015-07-09 14:58-0500\n"
12 | "Last-Translator: Frankie Jarrett \n"
13 | "Language-Team: Frankie Jarrett \n"
14 | "X-Generator: Poedit 1.8.2\n"
15 | "X-Poedit-Basepath: ..\n"
16 | "X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e;esc_attr__;esc_attr_e;_n;"
17 | "_x;_ex;_nx;esc_attr_x;esc_html_x;_n_noop;_nx_noop\n"
18 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19 | "Language: en_US\n"
20 | "X-Poedit-SearchPath-0: .\n"
21 | "X-Poedit-SearchPathExcluded-0: dev-lib\n"
22 | "X-Poedit-SearchPathExcluded-1: assets\n"
23 | "X-Poedit-SearchPathExcluded-2: languages\n"
24 |
25 | #: expire-passwords.php:228 expire-passwords.php:253 expire-passwords.php:277
26 | msgid "User does not exist."
27 | msgstr ""
28 |
29 | #: expire-passwords.php:257
30 | msgid "User has no role assigned."
31 | msgstr ""
32 |
33 | #: includes/class-list-table.php:69
34 | msgid "Password Reset"
35 | msgstr ""
36 |
37 | #: includes/class-list-table.php:92
38 | #, php-format
39 | msgid "%1$s ago"
40 | msgstr ""
41 |
42 | #: includes/class-login-screen.php:94
43 | msgid "You cannot reuse your old password."
44 | msgstr ""
45 |
46 | #: includes/class-login-screen.php:121
47 | msgid "Your password must be reset every day."
48 | msgstr ""
49 |
50 | #: includes/class-login-screen.php:128
51 | msgid ""
52 | "Please enter your username or e-mail below and a password reset link will be "
53 | "sent to you."
54 | msgstr ""
55 |
56 | #: includes/class-settings.php:39 includes/class-settings.php:40
57 | #: includes/class-settings.php:58 includes/class-settings.php:189
58 | msgid "Expire Passwords"
59 | msgstr ""
60 |
61 | #: includes/class-settings.php:96
62 | msgid "Require password reset every"
63 | msgstr ""
64 |
65 | #: includes/class-settings.php:104
66 | msgid "For users in these roles"
67 | msgstr ""
68 |
69 | #: includes/class-settings.php:121
70 | msgid "Require certain users to change their passwords on a regular basis."
71 | msgstr ""
72 |
73 | #: includes/class-settings.php:139
74 | msgid "days"
75 | msgstr ""
76 |
77 | #: includes/class-settings.php:188
78 | #, php-format
79 | msgid "Do you like the %1$s plugin? Please consider %2$s on %3$s"
80 | msgstr ""
81 |
82 | #: includes/class-settings.php:193
83 | msgid "leaving a ★★★★★ review"
84 | msgstr ""
85 |
--------------------------------------------------------------------------------
/languages/expire-passwords.pot:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2015 Expire Passwords
2 | # This file is distributed under the same license as the Expire Passwords package.
3 | #, fuzzy
4 | msgid ""
5 | msgstr ""
6 | "Project-Id-Version: Expire Passwords 0.3.0\n"
7 | "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/expire-passwords\n"
8 | "POT-Creation-Date: 2015-07-09 15:00-0500\n"
9 | "MIME-Version: 1.0\n"
10 | "Content-Type: text/plain; charset=UTF-8\n"
11 | "Content-Transfer-Encoding: 8bit\n"
12 | "PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
13 | "Last-Translator: FULL NAME \n"
14 | "Language-Team: \n"
15 | "X-Generator: Poedit 1.8.2\n"
16 | "X-Poedit-Basepath: ..\n"
17 | "X-Poedit-KeywordsList: __;_e;esc_html__;esc_html_e;esc_attr__;esc_attr_e;_n;_x;"
18 | "_ex;_nx;esc_attr_x;esc_html_x;_n_noop;_nx_noop\n"
19 | "X-Poedit-SearchPath-0: .\n"
20 | "X-Poedit-SearchPathExcluded-0: dev-lib\n"
21 | "X-Poedit-SearchPathExcluded-1: assets\n"
22 | "X-Poedit-SearchPathExcluded-2: languages\n"
23 |
24 | #: expire-passwords.php:228 expire-passwords.php:253 expire-passwords.php:277
25 | msgid "User does not exist."
26 | msgstr ""
27 |
28 | #: expire-passwords.php:257
29 | msgid "User has no role assigned."
30 | msgstr ""
31 |
32 | #: includes/class-list-table.php:69
33 | msgid "Password Reset"
34 | msgstr ""
35 |
36 | #: includes/class-list-table.php:92
37 | #, php-format
38 | msgid "%1$s ago"
39 | msgstr ""
40 |
41 | #: includes/class-login-screen.php:94
42 | msgid "You cannot reuse your old password."
43 | msgstr ""
44 |
45 | #: includes/class-login-screen.php:121
46 | msgid "Your password must be reset every day."
47 | msgstr ""
48 |
49 | #: includes/class-login-screen.php:128
50 | msgid ""
51 | "Please enter your username or e-mail below and a password reset link will be "
52 | "sent to you."
53 | msgstr ""
54 |
55 | #: includes/class-settings.php:39 includes/class-settings.php:40
56 | #: includes/class-settings.php:58 includes/class-settings.php:189
57 | msgid "Expire Passwords"
58 | msgstr ""
59 |
60 | #: includes/class-settings.php:96
61 | msgid "Require password reset every"
62 | msgstr ""
63 |
64 | #: includes/class-settings.php:104
65 | msgid "For users in these roles"
66 | msgstr ""
67 |
68 | #: includes/class-settings.php:121
69 | msgid "Require certain users to change their passwords on a regular basis."
70 | msgstr ""
71 |
72 | #: includes/class-settings.php:139
73 | msgid "days"
74 | msgstr ""
75 |
76 | #: includes/class-settings.php:188
77 | #, php-format
78 | msgid "Do you like the %1$s plugin? Please consider %2$s on %3$s"
79 | msgstr ""
80 |
81 | #: includes/class-settings.php:193
82 | msgid "leaving a ★★★★★ review"
83 | msgstr ""
84 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 |
2 | # Expire Passwords
3 |
4 | 
5 | Require certain users to change their passwords on a regular basis.
6 |
7 | **Contributors:** [fjarrett](https://profiles.wordpress.org/fjarrett)
8 | **Tags:** [admin](https://wordpress.org/plugins/tags/admin), [login](https://wordpress.org/plugins/tags/login), [membership](https://wordpress.org/plugins/tags/membership), [passwords](https://wordpress.org/plugins/tags/passwords), [profile](https://wordpress.org/plugins/tags/profile), [security](https://wordpress.org/plugins/tags/security), [users](https://wordpress.org/plugins/tags/users)
9 | **Requires at least:** 4.0
10 | **Tested up to:** 4.7
11 | **Stable tag:** 0.6.0
12 | **License:** [GPL-2.0](https://www.gnu.org/licenses/gpl-2.0.html)
13 |
14 | [](https://travis-ci.org/fjarrett/expire-passwords)
15 |
16 | ## Description ##
17 |
18 | **Did you find this plugin helpful? Please consider [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/expire-passwords).**
19 |
20 | Harden the security of your site by preventing unauthorized access to stale user accounts.
21 |
22 | This plugin is also ideal for sites needing to meet certain industry security compliances - such as government, banking or healthcare.
23 |
24 | In the plugin settings you can set the maximum number of days users are allowed to use the same password (90 days by default), as well as which user roles will be required to reset their passwords regularly (non-Administrators by default).
25 |
26 | **Languages supported:**
27 |
28 | * English
29 | * Czech
30 | * Español
31 |
32 | **Development of this plugin is done [on GitHub](https://github.com/fjarrett/expire-passwords). Pull requests welcome. Please see [issues reported](https://github.com/fjarrett/expire-passwords/issues) there before going to the plugin forum.**
33 |
34 | ## Screenshots ##
35 |
36 | ### Configure which user roles should be required to regularly reset their passwords and how often.
37 |
38 | 
39 |
40 | ### Users with expired passwords are redirected to the password reset screen upon sign in.
41 |
42 | 
43 |
44 | ### Users are not permitted to use the same password two times in a row during reset.
45 |
46 | 
47 |
48 | ## Changelog ##
49 |
50 | ### 0.6.0 - January 5, 2017 ###
51 | * Fix: Expiration not updating when resetting a password via email confirmation link.
52 |
53 | Props [@fjarrett](https://github.com/fjarrett)
54 |
55 | ### 0.5.0 - December 23, 2016 ###
56 | * Tweak: Indicate support for WordPress 4.7 and require at least 4.0.
57 | * Fix: Selected user roles in plugin settings not always being honored.
58 | * Fix: Destroy all sessions after login with an expired password.
59 |
60 | Props [@fjarrett](https://github.com/fjarrett)
61 |
62 | ### 0.4.0 - April 13, 2016 ###
63 | * New: Indicate support for WordPress 4.5.
64 | * Tweak: Bring back PHP 5.2 compatibility.
65 |
66 | Props [@fjarrett](https://github.com/fjarrett)
67 |
68 | ### 0.3.0 - July 9, 2015 ###
69 | * New: Language support for Czech
70 | * Tweak: Optimizations requiring PHP 5.3 or higher
71 | * Fix: User role array error before options exist
72 |
73 | Props [@fjarrett](https://github.com/fjarrett), [@dero](https://github.com/dero)
74 |
75 | ### 0.2.2 - July 2, 2015 ###
76 | * New: Language support for Español
77 |
78 | Props [@fjarrett](https://github.com/fjarrett)
79 |
80 | ### 0.2.1 - July 2, 2015 ###
81 | * Fix: Fatal undefined function error occuring in some cases ([#3](https://github.com/fjarrett/expire-passwords/issues/3))
82 |
83 | Props [@fjarrett](https://github.com/fjarrett)
84 |
85 | ### 0.2.0 - April 29, 2015 ###
86 | * New: Disallow using the same password as before on reset ([#1](https://github.com/fjarrett/expire-passwords/issues/1))
87 | * Tweak: Use default if limit is set to greater than 365 days
88 |
89 | Props [@fjarrett](https://github.com/fjarrett)
90 |
91 | ### 0.1.0 - April 28, 2015 ###
92 | * Initial release
93 |
94 | Props [@fjarrett](https://github.com/fjarrett)
95 |
96 |
97 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === Expire Passwords ===
2 | Contributors: fjarrett
3 | Tags: admin, login, membership, passwords, profile, security, users
4 | Requires at least: 4.0
5 | Tested up to: 4.7
6 | Stable tag: 0.6.0
7 | License: GPL-2.0
8 | License URI: https://www.gnu.org/licenses/gpl-2.0.html
9 |
10 | Require certain users to change their passwords on a regular basis.
11 |
12 | == Description ==
13 |
14 | **Did you find this plugin helpful? Please consider [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/expire-passwords).**
15 |
16 | Harden the security of your site by preventing unauthorized access to stale user accounts.
17 |
18 | This plugin is also ideal for sites needing to meet certain industry security compliances - such as government, banking or healthcare.
19 |
20 | In the plugin settings you can set the maximum number of days users are allowed to use the same password (90 days by default), as well as which user roles will be required to reset their passwords regularly (non-Administrators by default).
21 |
22 | **Languages supported:**
23 |
24 | * English
25 | * Czech
26 | * Español
27 |
28 | **Development of this plugin is done [on GitHub](https://github.com/fjarrett/expire-passwords). Pull requests welcome. Please see [issues reported](https://github.com/fjarrett/expire-passwords/issues) there before going to the plugin forum.**
29 |
30 | == Screenshots ==
31 |
32 | 1. Configure which user roles should be required to regularly reset their passwords and how often.
33 | 2. Users with expired passwords are redirected to the password reset screen upon sign in.
34 | 3. Users are not permitted to use the same password two times in a row during reset.
35 |
36 | == Changelog ==
37 |
38 | = 0.6.0 - January 5, 2017 =
39 |
40 | * Fix: Expiration not updating when resetting a password via email confirmation link.
41 |
42 | Props [@fjarrett](https://github.com/fjarrett)
43 |
44 | = 0.5.0 - December 23, 2016 =
45 |
46 | * Tweak: Indicate support for WordPress 4.7 and require at least 4.0.
47 | * Fix: Selected user roles in plugin settings not always being honored.
48 | * Fix: Destroy all sessions after login with an expired password.
49 |
50 | Props [@fjarrett](https://github.com/fjarrett)
51 |
52 | = 0.4.0 - April 13, 2016 =
53 |
54 | * New: Indicate support for WordPress 4.5.
55 | * Tweak: Bring back PHP 5.2 compatibility.
56 |
57 | Props [@fjarrett](https://github.com/fjarrett)
58 |
59 | = 0.3.0 - July 9, 2015 =
60 |
61 | * New: Language support for Czech
62 | * Tweak: Optimizations requiring PHP 5.3 or higher
63 | * Fix: User role array error before options exist
64 |
65 | Props [@fjarrett](https://github.com/fjarrett), [@dero](https://github.com/dero)
66 |
67 | = 0.2.2 - July 2, 2015 =
68 |
69 | * New: Language support for Español
70 |
71 | Props [@fjarrett](https://github.com/fjarrett)
72 |
73 | = 0.2.1 - July 2, 2015 =
74 |
75 | * Fix: Fatal undefined function error occuring in some cases ([#3](https://github.com/fjarrett/expire-passwords/issues/3))
76 |
77 | Props [@fjarrett](https://github.com/fjarrett)
78 |
79 | = 0.2.0 - April 29, 2015 =
80 |
81 | * New: Disallow using the same password as before on reset ([#1](https://github.com/fjarrett/expire-passwords/issues/1))
82 | * Tweak: Use default if limit is set to greater than 365 days
83 |
84 | Props [@fjarrett](https://github.com/fjarrett)
85 |
86 | = 0.1.0 - April 28, 2015 =
87 |
88 | * Initial release
89 |
90 | Props [@fjarrett](https://github.com/fjarrett)
91 |
--------------------------------------------------------------------------------
/svn-url:
--------------------------------------------------------------------------------
1 | https://plugins.svn.wordpress.org/expire-passwords/
2 |
--------------------------------------------------------------------------------