Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /** ensure this file is being included by a parent file */
- if ( ! ( defined( '_VALID_CB' ) || defined( '_JEXEC' ) || defined( '_VALID_MOS' ) ) ) { die( 'Direct Access to this location is not allowed.' ); }
- use CBLib\AhaWow\Controller\Elements\TableBrowser;
- global $_PLUGINS;
- $_PLUGINS->loadPluginGroup( 'user', array( (int) 1 ) );
- $_PLUGINS->registerUserFieldTypes( array( 'passgen' => 'CBpassgen' ) );
- $_PLUGINS->registerUserFieldParams();
- class CBpassgen extends TableBrowser {
- function draw( $viewType = 'view' ) {
- $this->_performTableActions();
- }
- protected function _performTableActions() {
- global $_CB_framework;
- if ( ! isset( $_REQUEST[$this->name] ) ) {
- return;
- }
- $subtask = cbGetParam( $_REQUEST[$this->name], 'subtask', '' );
- if ( ! $subtask ) {
- return;
- }
- $task_parsed = explode( '/', $subtask );
- switch ( $task_parsed[0] ) {
- case 'setfield':
- switch ( $task_parsed[1] ) {
- case 'block':
- if ($task_parsed[2]==0) {
- $_CB_framework->enqueueMessage( 'Sent an email with a new generated password!' );
- }
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment