id ) { return; } printf( '

%s %s

', esc_html__( 'This account has no wallet attached, so it can only sign in with a password. If passwords are turned off, it will be locked out.', 'sirius-press' ), esc_url( admin_url( 'profile.php#sirius-wallet-link' ) ), esc_html__( 'Attach a wallet', 'sirius-press' ) ); } public static function render( $user ) { $current = SP_Identity::address_of( $user->ID ); $nonce = SPA_Challenge::issue(); $message = SPA_Challenge::message( $nonce, SPA_Challenge::PURPOSE_LINK ); ?> get_error_message(), 'auth' ); return; } $previous = SP_Identity::address_of( $user_id ); $result = SP_Identity::set_address( $user_id, $address ); if ( is_wp_error( $result ) ) { SP_Inbox::add( $user_id, __( 'Wallet not attached', 'sirius-press' ), $result->get_error_message(), 'auth' ); return; } SP_Inbox::add( $user_id, __( 'Wallet attached', 'sirius-press' ), sprintf( /* translators: 1: new address, 2: previous address or a note that there was none. */ esc_html__( 'This account now signs in with %1$s. Previously: %2$s.', 'sirius-press' ), '' . esc_html( $address ) . '', '' !== $previous ? '' . esc_html( $previous ) . '' : esc_html__( 'no wallet', 'sirius-press' ) ), 'auth' ); } }