| @@ -332,9 +332,11 @@ | ||
| 332 | 332 | */ |
| 333 | 333 | public function hide_notices() { |
| 334 | 334 | $hide_notice = Input::get( 'tutor-hide-notice', '' ); |
| 335 | 335 | $is_register_enabled = Input::get( 'tutor-registration', '' ); |
| 336 | - if ( is_admin() && 'registration' === $hide_notice ) { | |
| 336 | + $has_manage_cap = current_user_can( 'manage_options' ); | |
| 337 | + | |
| 338 | + if ( $has_manage_cap && is_admin() && 'registration' === $hide_notice ) { | |
| 337 | 339 | tutor_utils()->checking_nonce( 'get' ); |
| 338 | 340 | |
| 339 | 341 | if ( 'enable' === $is_register_enabled ) { |
| 340 | 342 | update_option( 'users_can_register', 1 ); |
| @@ -339,9 +341,9 @@ | ||
| 339 | 341 | if ( 'enable' === $is_register_enabled ) { |
| 340 | 342 | update_option( 'users_can_register', 1 ); |
| 341 | 343 | } else { |
| 342 | 344 | self::$hide_registration_notice = true; |
| 343 | - setcookie( 'tutor_notice_hide_registration', 1, time() + ( 86400 * 30 ), tutor()->basepath ); | |
| 345 | + setcookie( 'tutor_notice_hide_registration', 1, time() + MONTH_IN_SECONDS, tutor()->basepath ); | |
| 344 | 346 | } |
| 345 | 347 | } |
| 346 | 348 | } |
| 347 | 349 | |