Felienne Hermans
Felienne Hermans
December 9th, 2021

Code Reading Club Reading Countdown - 9

Article cover photo

Countdown - Snippet 9

Today's code reading countdown in PHP.

Snippet

CRCRC-9

Snippet in text

do_action( 'preprocess_signup_form' );
if ( is_user_logged_in() && ( 'all' === $active_signup || 'blog' === $active_signup ) ) {
    signup_another_blog( $newblogname );
} elseif ( ! is_user_logged_in() && ( 'all' === $active_signup || 'user' === $active_signup ) ) {
    signup_user( $newblogname, $user_email );
} elseif ( ! is_user_logged_in() && ( 'blog' === $active_signup ) ) {
    _e( 'Sorry, new registrations are not allowed at this time.' );
} else {
    _e( 'You are logged in already. No need to register again!' );
}

Question

What user stories do you recognize in this snippet?

Submission

Submit your answer in our form.