Lines Matching refs:this

30             msg($this->getLang('error_badauth'));
34 $this->_auth = $auth;
38 $this->_import_failures = $_SESSION['import_failures'];
53 if (!$this->_auth->canDo('addUser')) return false;
55 if ($this->validateDefaults() === true) {
56 $this->_import();
60 $this->_downloadImportFailures();
72 print $this->locale_xhtml('intro');
73 $this->printFormHTML();
74 $this->printFailuresHTML();
84 $form->setHiddenField('page', $this->getPluginName());
85 $form->addFieldsetOpen($this->getLang('legend_defaults'));
86 $form->addTextInput('defaults[name]', $this->getLang('form_name') . '*');
88 $form->addTextInput('defaults[email]', $this->getLang('form_email') . '*');
90 $form->addTextInput('defaults[password]', $this->getLang('form_password') . '*');
92 $form->addTextInput('defaults[groups]', $this->getLang('form_groups'));
94 $form->addFieldsetOpen($this->getLang('legend_csv'));
97 $form->addButton('cmd[import]', $this->getLang('btn_import'));
107 var_dump($this->lang);
112 if ($this->_import_failures) {
113 $digits = strlen(count($this->_import_failures));
115 ptln(' <h3>'.$this->getLang('import_header').'</h3>');
119 ptln(' <th class="line">'.$this->getLang('line').'</th>');
120 ptln(' <th class="error">'.$this->getLang('error').'</th>');
121 ptln(' <th class="userid">'.$this->getLang('user_id').'</th>');
122 ptln(' <th class="userpass">'.$this->getLang('user_pass').'</th>');
123 ptln(' <th class="username">'.$this->getLang('user_name').'</th>');
124 ptln(' <th class="usermail">'.$this->getLang('user_mail').'</th>');
125 ptln(' <th class="usergroups">'.$this->getLang('user_groups').'</th>');
129 foreach ($this->_import_failures as $line => $failure) {
142 …ptln(' <p><a href="'.$failure_download_link.'">'.$this->getLang('import_downloadfailures').'</a><…
154 foreach ($this->defaults as $field) {
156 msg($this->getLang('error_required_defaults'), -1);
159 $this->defaults[$field] = $_REQUEST['defaults'][$field];
163 $this->defaults[$field] .= ',user';
179 if (!$this->_auth->canDo('addUser')) return false;
182 $upl = $this->_isUploadedFile($_FILES['import']['tmp_name']);
184 msg($this->getLang('import_error_upload'),-1);
188 $this->_import_failures = array();
202 … if ($raw[0] == 'user_id' || $raw[0] == $this->getLang('user_id')) continue; // skip headers
207 $error = sprintf($this->getLang('import_error_fields'), count($raw));
208 … $this->_import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv);
212 $clean = $this->_cleanImportUser($raw, $error);
213 if ($clean && $this->_addImportUser($clean, $error)) {
214 $sent = $this->_notifyUser($clean[0],$clean[1],false);
216 msg(sprintf($this->getLang('import_notify_fail'),$clean[0],$clean[3]),-1);
221 … $this->_import_failures[$line] = array('error' => $error, 'user' => $raw, 'orig' => $csv);
224 …msg(sprintf($this->getLang('import_success_count'), ($import_success_count+$import_fail_count), $i…
226 msg(sprintf($this->getLang('import_failure_count'), $import_fail_count),-1);
229 msg($this->getLang('import_error_readfail'),-1);
235 $_SESSION['import_failures'] = $this->_import_failures;
249 $candidate[1] = $this->defaults['password'];
252 $candidate[2] = $this->defaults['name'];
255 $candidate[3] = $this->defaults['email'];
258 $candidate[4] = $this->defaults['groups'];
273 $this->insertDefaults($candidate);
282 $cleaned = $this->_retrieveUser();
285 $error = $this->getLang('import_error_baduserid');
291 if (!($this->_auth->canDo('modName') xor empty($name))){
292 $error = $this->getLang('import_error_badname');
296 if ($this->_auth->canDo('modMail')) {
298 $error = $this->getLang('import_error_badmail');
303 $error = $this->getLang('import_error_badmail');
321 if (!$this->_auth->triggerUserMod('create', $user)) {
322 $error = $this->getLang('import_error_create');
369 msg($this->getLang('notify_ok'), 1);
373 msg($this->getLang('notify_fail'), -1);
395 foreach ($this->_import_failures as $fail) {