e107inc/e107

View on GitHub
e107_admin/users.php

Summary

Maintainability
A
0 mins
Test Coverage
F
8%

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

if (!getperms('4|U0|U1|U2|U3'))
Severity: Minor
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if (!getperms("0") && !check_class($e_userclass->class_tree[$class_id]['userclass_editclass']))
Severity: Minor
Found in e107_admin/users.php by phan

Invalid offset "user_loginname" of array type array{user_name:mixed}
Open

                $message = str_replace('[x]', $allData['data']['user_loginname'], USRLAN_237);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 1 (sourceArrayData) is null but \e_array::unserialize() takes string defined at /code/e107_handlers/core_functions.php:564
Open

            $user_prefs = e107::getArrayStorage()->unserialize($user_data['user_prefs']);
Severity: Minor
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if(getperms('4|U0')) // Quick Add User access should not be allowed to create new users with escalated perms.
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

            $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if($mode == 'filter' && getperms('3'))
Severity: Minor
Found in e107_admin/users.php by phan

Call to undeclared method \e_admin_ui::getExtended
Open

            $extData = $controller->getExtended();
Severity: Critical
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

            $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Call to undeclared method \e_admin_form_ui::RankImageDropdown
Open

            <td>".$ui->RankImageDropdown($imageList,'calc_img[main_admin]',$info['image'])."</td>
Severity: Critical
Found in e107_admin/users.php by phan

Argument 2 (vals) is int but \e_parse::lanVars() takes array|string defined at /code/e107_handlers/e_parse_class.php:3842
Open

        $caption = $tp->lanVars(USRLAN_252,$count);
Severity: Minor
Found in e107_admin/users.php by phan

Argument #1 of this call to \str_replace is typically a literal or constant but isn't, but argument #3 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
Open

                        $message = str_replace($rplc_from, $rplc_to, USRLAN_222);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 1 (password) is null but \UserHandler::HashPassword() takes string defined at /code/e107_handlers/user_handler.php:226
Open

            $user_prefs['email_password'] = $userMethods->HashPassword($savePassword, $user_data['user_email']);
Severity: Minor
Found in e107_admin/users.php by phan

Reference to undeclared constant \BULLET (Did you mean $bullet)
Open

                $bullet = '<img src="'.THEME.'images/'.BULLET.'" alt="" class="icon" />';
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (selected) is 24 but \e_form::select() takes bool|false defined at /code/e107_handlers/form_handler.php:3325
Open

        <div class='form-inline'>".USRLAN_253." ".$frm->select('resendAge', $age, 24).$frm->checkbox('resetPasswords',1,false,USRLAN_254).
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

        $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Invalid offset "user_email" of array type array{user_join:int}|array{user_password:bool|string}|null
Open

            $user_prefs['email_password'] = $userMethods->HashPassword($savePassword, $user_data['user_email']);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (target) is null but \e_form::open() takes string defined at /code/e107_handlers/form_handler.php:153
Open

        $text = "<div>".$frm->open("core-user-adduser-form",null,null,'autocomplete=0')."
Severity: Minor
Found in e107_admin/users.php by phan

Variable $imageList was undeclared, but array fields are being added to it.
Open

            $imageList[] = $v['fname'];
Severity: Info
Found in e107_admin/users.php by phan

Call to undeclared method \e_admin_form_ui::RankImageDropdown
Open

                <td>".$ui->RankImageDropdown($imageList, "calc_img[$k]", $r['image'])."&nbsp;".
Severity: Critical
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if($mode == 'read' || (str_replace(".","",$perms) == '0' && $uid == USERID) || !getperms('3'))
Severity: Minor
Found in e107_admin/users.php by phan

Reference to undeclared constant \ADMIN_EDIT_ICON
Open

                        ".ADMIN_EDIT_ICON."</a>";
Severity: Minor
Found in e107_admin/users.php by phan

Assigning array<string>&gt;</string> to property but \users_admin_ui->fields is array<string>&gt;&gt;|array<string>&gt;|array<string>&gt;|array<string>&gt;|array<string>&gt;|array<string>&gt;|array<string>|array{checkboxes:array{title:'',type:null,width:'50px',forced:true,thclass:'center',class:'center'},user_id:array{title:'ID',tab:0,type:'text',data:'int',width:'3%',forced:true,thclass:'center',class:'center',readParms:'link=sef&amp;target=blank'},user_ban:array{title:'Status',tab:0,type:'method',width:'auto',filter:true,batch:true,thclass:'center',class:'center'},user_name:array{title:'Display name',tab:0,type:'text',inline:true,data:'safestr',width:'auto',thclass:'left first'},user_loginname:array{title:'Login Name',tab:0,type:'text',data:'safestr',width:'auto'},user_login:array{title:'Real Name',tab:0,type:'text',inline:true,data:'safestr',width:'auto'},user_customtitle:array{title:'Custom title',tab:0,type:'text',inline:true,data:'safestr',width:'auto'},user_password:array{title:'Password',tab:0,type:'method',data:'safestr',width:'auto'},user_sess:array{title:'Session',tab:0,noedit:true,type:'text',width:'auto'},user_image:array{title:'Avatar',tab:0,type:'method',data:'str',width:'auto',thclass:'center',class:'center'},user_email:array{title:'Email address',tab:0,type:'text',inline:true,data:'safestr',width:'auto',writeParms:array{size:'xxlarge'}},user_hideemail:array{title:'Hide email',tab:0,type:'boolean',data:'int',width:'auto',thclass:'center',class:'center',filter:true,batch:true,readParms:'trueonly=1'},user_xup:array{title:'Xup',tab:0,noedit:true,type:'text',data:'str',width:'auto'},user_class:array{title:'User class',tab:0,type:'userclasses',data:'safestr',inline:true,writeParms:'classlist=classes,new',readParms:'classlist=classes,new&amp;defaultLabel=--',filter:true,batch:true},user_join:array{title:'Join Date',tab:0,noedit:true,type:'datestamp',width:'auto',writeParms:'readonly=1'},user_lastvisit:array{title:'Last Visit',tab:0,noedit:true,type:'datestamp',width:'auto'},user_currentvisit:array{title:'Current Visit',tab:0,noedit:true,type:'datestamp',width:'auto'},user_comments:array{title:'Comments',tab:0,noedit:true,type:'int',width:'auto',thclass:'right',class:'right'},user_lastpost:array{title:'Last Post',tab:0,noedit:true,type:'datestamp',width:'auto'},user_ip:array{title:'IP Address',tab:0,noedit:true,type:'ip',data:'str',width:'auto'},user_visits:array{title:'Visits',tab:0,noedit:true,type:'int',width:'auto',thclass:'right',class:'right'},user_admin:array{title:'Admin',tab:0,type:'method',width:'auto',thclass:'center',class:'center',filter:true,batch:true,readParms:'trueonly=1'},user_perms:array{title:'Perms',tab:0,type:'method',data:'str',width:'auto'},user_pwchange:array{title:'Password Change',tab:0,noedit:true,type:'datestamp',width:'auto'},user_signature:array{title:'Signature',type:'textarea',data:'str',width:'auto',writeParms:array{size:'xxlarge'}}}</string></string></string></string></string></string></string>
Open

                 $this->fields[$fld]['inline'] = false;
Severity: Minor
Found in e107_admin/users.php by phan

Call to undeclared method \e_db::escape
Open

            $new_data['user_password'] = e107::getDb()->escape(e107::getUserSession()->HashPassword($savePassword, $loginname), false);
Severity: Critical
Found in e107_admin/users.php by phan

Suspicious array access to nullable ?array{user_join:int}|?array{user_password:bool|string}|?array{user_prefs:null|string}|array|array{user_id:int|true}
Open

            e107::getLog()->add('USET_02',"UName: {$user_data['user_name']}; Email: {$user_data['user_email']}", E_LOG_INFORMATIVE);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 2 (value) is '' but \e_form::number() takes int defined at /code/e107_handlers/form_handler.php:925
Open

            <td>".$frm->number('new_calc_lower', '')."</td>
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

            $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

        $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Suspicious array access to nullable ?array{user_join:int}|?array{user_password:bool|string}|?array{user_prefs:null|string}|array|array{user_id:int|true}
Open

                    ->addSuccess(USRLAN_128.': <strong>'.htmlspecialchars($user_data['user_loginname'], ENT_QUOTES, CHARSET).'</strong>');    
Severity: Minor
Found in e107_admin/users.php by phan

Call to undeclared method \e_admin_form_ui::RankImageDropdown
Open

            <td>".$ui->RankImageDropdown($imageList, 'new_calc_img')."</td>
Severity: Critical
Found in e107_admin/users.php by phan

Call to undeclared method \e_admin_ui::getAvatarList
Open

            $list = $this->getController()->getAvatarList();
Severity: Critical
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if(!getperms('4|U0')) // Quick Add User Access Only. 
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

             $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Suspicious array access to null
Open

        $user_data['user_password'] = $userMethods->HashPassword($savePassword, $user_data['user_loginname']);
Severity: Minor
Found in e107_admin/users.php by phan

Suspicious array access to nullable ?array{user_join:int}|?array{user_password:bool|string}|?array{user_prefs:null|string}|array|array{user_id:int|true}
Open

            e107::getLog()->user_audit(USER_AUDIT_ADD_ADMIN, $user_data, 0, $user_data['user_loginname']);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (selected) is int but \e_form::select() takes bool|false defined at /code/e107_handlers/form_handler.php:3325
Open

                    ".$frm->select('sendconfemail', array('0' => USRLAN_240, '1' => USRLAN_241, '2' => USRLAN_242), (int) varset($_POST['sendconfemail'], 0), array('size'=>'xlarge'))."
Severity: Minor
Found in e107_admin/users.php by phan

Call to undeclared method \e_admin_form_ui::RankImageDropdown
Open

            <td>".$ui->RankImageDropdown($imageList, 'calc_img[admin]', $info['image'])."</td>
Severity: Critical
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

        if($mode == 'read'  || (str_replace(".","",$perms) == '0') || !getperms('3'))
Severity: Minor
Found in e107_admin/users.php by phan

Assigning false to property but \users_admin_ui->tabs is array{0:'Basic',1:'Extended'}
Open

            $this->tabs = false;
Severity: Minor
Found in e107_admin/users.php by phan

Argument #1 of this call to \str_replace is typically a literal or constant but isn't, but argument #3 (which is typically a variable) is a literal or constant. The arguments may be in the wrong order.
Open

            $message = str_replace($rplc_from, $rplc_to, USRLAN_228);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 1 (userInfo) is ?array{user_join:int}|?array{user_password:bool|string}|?array{user_prefs:null|string} but \UserHandler::addNonDefaulted() takes array defined at /code/e107_handlers/user_handler.php:927
Open

        $userMethods->addNonDefaulted($user_data);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 1 (string) is null but \htmlspecialchars() takes string
Open

                $mes->addSuccess(LAN_PASSWORD.': <strong>'.htmlspecialchars($savePassword, ENT_QUOTES, CHARSET).'</strong>');    
Severity: Minor
Found in e107_admin/users.php by phan

Argument 2 (callback) is array{0:\user_class,1:'checkbox_desc'} but \user_class::vetted_tree() takes \function|object|string defined at /code/e107_handlers/userclass_class.php:720
Open

        $text .= $e_userclass->vetted_tree('userclass', array($e_userclass,'checkbox_desc'), $sysuser->getValue('class'), 'classes, no-excludes');
Severity: Minor
Found in e107_admin/users.php by phan

Argument 2 (login_name) is null but \UserHandler::HashPassword() takes string defined at /code/e107_handlers/user_handler.php:226
Open

            $user_prefs['email_password'] = $userMethods->HashPassword($savePassword, $user_data['user_email']);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 2 (replace) is null but \str_replace() takes array|string
Open

                $message = str_replace('[x]', $allData['data']['user_loginname'], USRLAN_237);
Severity: Minor
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

            if (!$user_admin && !$row['user_ban'] && $row['user_ban'] != 2 && getperms('3'))
Severity: Minor
Found in e107_admin/users.php by phan

Argument 1 (password) is null but \UserHandler::HashPassword() takes string defined at /code/e107_handlers/user_handler.php:226
Open

        $user_data['user_password'] = $userMethods->HashPassword($savePassword, $user_data['user_loginname']);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 1 (user_id) is false but \e107::getSystemUser() takes int defined at /code/e107_handlers/e107_class.php:2081
Open

            $sysuser = e107::getSystemUser(false, false);
Severity: Minor
Found in e107_admin/users.php by phan

Reference to undeclared property \e_admin_controller->deleteConfirmMessage
Open

                        $this->getController()->deleteConfirmMessage = $message;
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

            $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

            $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

            $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Argument 2 (curval) is false but \e_form::userclass() takes int defined at /code/e107_handlers/form_handler.php:3394
Open

        " <div class='input-group'>".$frm->userclass('resendClass',false, null )."<span class='input-group-btn'>".
Severity: Minor
Found in e107_admin/users.php by phan

Argument 2 (value) is 1 but \e_form::button() takes array|string defined at /code/e107_handlers/form_handler.php:3876
Open

        $frm->button('resendToAll', 1, 'warning', LAN_GO)."
Severity: Minor
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

            if(getperms('0') && !($row['user_admin'] && getperms('0', $row['user_perms'])))
Severity: Minor
Found in e107_admin/users.php by phan

Assigning array<string></string> to property but \users_ranks_ui->fields is array{checkboxes:array{title:'',type:null,data:null,width:'5%',thclass:'center',forced:'1',class:'center',toggle:'e-multiselect'},gen_id:array{title:'ID',nolist:true,data:'int',width:'5%',help:'',readParms:'',writeParms:'',class:'left',thclass:'left'},gen_type:array{title:'Ban',type:'hidden',data:'str',width:'auto',batch:true,filter:true,inline:true,help:'',readParms:'',writeParms:'value=user_rank_data',class:'left',thclass:'left'},gen_ip:array{title:'Rank Name',type:'text',data:'str',inline:true,width:'auto',help:'',readParms:'',writeParms:'',class:'left',thclass:'left'},gen_intdata:array{title:'Lower Threshold',type:'text',batch:false,data:'int',inline:true,width:'auto',help:'',readParms:'default=-',writeParms:'',class:'center',thclass:'center'},gen_datestamp:array{title:'Special',type:'hidden',nolist:true,data:'int',width:'auto',filter:true,help:'',readParms:'',writeParms:'',class:'left',thclass:'left'},gen_user_id:array{title:'Lang Prefix',type:'boolean',batch:true,data:'int',inline:true,width:'15%',help:'',readParms:'',writeParms:'',class:'center',thclass:'center'},gen_chardata:array{title:'Icon',type:'method',data:'str',inline:true,width:'auto',help:'',readParms:array{},writeParms:array{},class:'left',thclass:'left'},options:array{title:'Options',type:'method',data:null,width:'10%',thclass:'center last',class:'right last',forced:'1',readParms:'edit=0'}}
Open

                $this->fields['gen_chardata']['writeParms']['optArray'][$id] = $v['fname'];
Severity: Minor
Found in e107_admin/users.php by phan

Assigning array<string></string> to property but \users_admin_ui->fields is array{checkboxes:array{title:'',type:null,width:'50px',forced:true,thclass:'center',class:'center'},user_id:array{title:'ID',tab:0,type:'text',data:'int',width:'3%',forced:true,thclass:'center',class:'center',readParms:'link=sef&target=blank'},user_ban:array{title:'Status',tab:0,type:'method',width:'auto',filter:true,batch:true,thclass:'center',class:'center'},user_name:array{title:'Display name',tab:0,type:'text',inline:true,data:'safestr',width:'auto',thclass:'left first'},user_loginname:array{title:'Login Name',tab:0,type:'text',data:'safestr',width:'auto'},user_login:array{title:'Real Name',tab:0,type:'text',inline:true,data:'safestr',width:'auto'},user_customtitle:array{title:'Custom title',tab:0,type:'text',inline:true,data:'safestr',width:'auto'},user_password:array{title:'Password',tab:0,type:'method',data:'safestr',width:'auto'},user_sess:array{title:'Session',tab:0,noedit:true,type:'text',width:'auto'},user_image:array{title:'Avatar',tab:0,type:'method',data:'str',width:'auto',thclass:'center',class:'center'},user_email:array{title:'Email address',tab:0,type:'text',inline:true,data:'safestr',width:'auto',writeParms:array{size:'xxlarge'}},user_hideemail:array{title:'Hide email',tab:0,type:'boolean',data:'int',width:'auto',thclass:'center',class:'center',filter:true,batch:true,readParms:'trueonly=1'},user_xup:array{title:'Xup',tab:0,noedit:true,type:'text',data:'str',width:'auto'},user_class:array{title:'User class',tab:0,type:'userclasses',data:'safestr',inline:true,writeParms:'classlist=classes,new',readParms:'classlist=classes,new&defaultLabel=--',filter:true,batch:true},user_join:array{title:'Join Date',tab:0,noedit:true,type:'datestamp',width:'auto',writeParms:'readonly=1'},user_lastvisit:array{title:'Last Visit',tab:0,noedit:true,type:'datestamp',width:'auto'},user_currentvisit:array{title:'Current Visit',tab:0,noedit:true,type:'datestamp',width:'auto'},user_comments:array{title:'Comments',tab:0,noedit:true,type:'int',width:'auto',thclass:'right',class:'right'},user_lastpost:array{title:'Last Post',tab:0,noedit:true,type:'datestamp',width:'auto'},user_ip:array{title:'IP Address',tab:0,noedit:true,type:'ip',data:'str',width:'auto'},user_visits:array{title:'Visits',tab:0,noedit:true,type:'int',width:'auto',thclass:'right',class:'right'},user_admin:array{title:'Admin',tab:0,type:'method',width:'auto',thclass:'center',class:'center',filter:true,batch:true,readParms:'trueonly=1'},user_perms:array{title:'Perms',tab:0,type:'method',data:'str',width:'auto'},user_pwchange:array{title:'Password Change',tab:0,noedit:true,type:'datestamp',width:'auto'},user_signature:array{title:'Signature',type:'textarea',data:'str',width:'auto',writeParms:array{size:'xxlarge'}}}
Open

        $this->fields['user_image']['width'] = '80px';
Severity: Minor
Found in e107_admin/users.php by phan

Suspicious array access to int|true
Open

            $update['data'][$key] = vartrue($new_data['ue'][$key],'_NULL_');
Severity: Minor
Found in e107_admin/users.php by phan

Argument 3 (exclude_query) is true but \users_admin_ui::redirect() takes array|string defined at /code/e107_handlers/admin_ui.php:2464
Open

            $this->redirect('list', 'main', true);
Severity: Minor
Found in e107_admin/users.php by phan

Invalid offset "user_prefs" of array type array{user_join:int}|array{user_password:bool|string}|null
Open

            $user_prefs = e107::getArrayStorage()->unserialize($user_data['user_prefs']);
Severity: Minor
Found in e107_admin/users.php by phan

Call to deprecated function \getperms() defined at /code/class2.php:1322
Open

                if ($user_admin && $row['user_perms'] != "0" && getperms('3'))
Severity: Minor
Found in e107_admin/users.php by phan

Argument 2 (callback) is array{0:\user_class,1:'checkbox_desc'} but \user_class::vetted_tree() takes \function|object|string defined at /code/e107_handlers/userclass_class.php:720
Open

        $temp = $e_userclass->vetted_tree('class', array($e_userclass, 'checkbox_desc'), $user_data['user_class'], 'classes, no-excludes');
Severity: Minor
Found in e107_admin/users.php by phan

Variable $cfg was undeclared, but array fields are being added to it.
Open

            $cfg[$f]['op'] = $o;
Severity: Info
Found in e107_admin/users.php by phan

Argument 3 (type) is null but \e_form::userclass() takes string defined at /code/e107_handlers/form_handler.php:3394
Open

        " <div class='input-group'>".$frm->userclass('resendClass',false, null )."<span class='input-group-btn'>".
Severity: Minor
Found in e107_admin/users.php by phan

There are no issues that match your filters.

Category
Status