Exemplo n.º 1
0
 public function profile($instance = array())
 {
     /** check access **/
     if (!wpl_users::check_access('profilewizard')) {
         /** import message tpl **/
         $this->message = __("You don't have access to this part!", WPL_TEXTDOMAIN);
         return parent::render($this->tpl_path, 'message');
     }
     _wpl_import('libraries.flex');
     $this->tpl = 'profile';
     $this->kind = wpl_flex::get_kind_id('user');
     $this->user_id = wpl_users::get_cur_user_id();
     if (wpl_users::is_administrator($this->user_id) and wpl_request::getVar('id', 0)) {
         $this->user_id = wpl_request::getVar('id');
     }
     $this->user_fields = wpl_flex::get_fields('', 1, $this->kind, 'pwizard', 1);
     $this->user_data = (array) wpl_users::get_wpl_data($this->user_id);
     /** import tpl **/
     parent::render($this->tpl_path, $this->tpl);
 }
Exemplo n.º 2
0
_wpl_import($this->tpl_path . '.scripts.js');
_wpl_import($this->tpl_path . '.scripts.css');
?>
<div class="wrap wpl-wp user-wp">
    <header>
        <div id="icon-user" class="icon48">
        </div>
        <h2><?php 
echo __('User Manager', WPL_TEXTDOMAIN);
?>
</h2>
        <?php 
if (wpl_global::check_addon('membership')) {
    ?>
            <a href="<?php 
    echo wpl_global::add_qs_var('kind', wpl_flex::get_kind_id('user'), wpl_global::get_wpl_admin_menu('wpl_admin_flex'));
    ?>
" class="setting-toolbar-btn button" title="<?php 
    echo __('Manage User Data Structure', WPL_TEXTDOMAIN);
    ?>
"><?php 
    echo __('Manage User Data Structure', WPL_TEXTDOMAIN);
    ?>
</a>
        <?php 
}
?>
    </header>
    <div class="wpl_user_list"><div class="wpl_show_message"></div></div>
    <div class="wpl-users-search-form">
        <form method="GET" id="wpl_users_search_form">