changed git call from https to git readonly
[atutor.git] / mods / wiki / plugins / auth-liveuser / liveuser_users_gui.php
1 <?php
2
3 /**
4  * Copyright (c) 2003, The Burgiss Group, LLC
5  * This source code is part of eWiki LiveUser Plugin.
6  *
7  * eWiki LiveUser Plugin is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or (at your
10  * option) any later version.
11  *
12  * eWiki LiveUser Plugin is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with Wiki LiveUser Plugin; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21
22 require_once(dirname(__FILE__).'/liveuser_aux.php');
23
24 /*
25  * constant regulates whether subgroups are enabled. this option has been
26  * disabled until LiveUser has complete support.
27  */
28 define('LU_GUI_USER_SUBGROUPS', 0);
29
30 // ewiki callback for user/group administration page
31 $ewiki_plugins['page']['AdminUsers'] = 'ewiki_page_liveuser_admin_users';
32
33 /**
34  * admin gui for modifying user accounts.
35  *
36  * @param string id
37  * @param mixed data
38  * @param string action
39  * @return string page output response
40  */
41 function ewiki_page_liveuser_admin_users($id, $data, $action)
42 {
43     global $liveuserAuthAdmin, $liveuserPermAdmin, $ewiki_plugins;
44
45     ob_start();
46     
47     echo ewiki_make_title($id, $id, 2);    
48   
49     // handle posted deletes or updates
50     if (isset($_POST['submit_deleteusers']) || isset($_POST['submit_changeusers']) || isset($_POST['submit_adduserstogroup']) ||
51         isset($_POST['submit_removeusersfromgroup']) || isset($_POST['submit_changegroups'])) {
52         foreach ($_POST as $key => $value) {
53           
54             list($prefix, $id) = explode('_', $key, 2);
55             
56             //get password status of current $id 
57             $username=$_POST['origname_'.$id];
58             $pwdstatus = ewiki_get_uservar("passwdstatus", NULL, $username);
59             
60             // Remove a user
61             if ($prefix == 'chk' && is_numeric($id) && $value == 'on' && isset($_POST['submit_deleteusers'])) {
62                 if (liveuser_removeEntity('user_id', $id)) {
63                     echo '<p>User '.$id.' was successfully removed.</p>';
64                 } else {
65                     echo '<p>Removal of user '.$id.' failed.</p>';
66                 }
67             }
68             
69             // Add a user to a group
70             if ($prefix == 'chk' && is_numeric($id) && $value == 'on' && isset($_POST['submit_adduserstogroup'])) {
71                 if (($group_id = liveuser_checkEntity('group', $_POST['grouplist'])) !== false) {
72                     if (liveuser_checkGroupUser($group_id, $id) === false) {
73                         if ($liveuserPermAdmin->addUserToGroup($id, $group_id)) {
74                             echo '<p>User '.$id.' was successfully added to group '.$_POST['grouplist'].'.</p>';
75                         } else {
76                             echo '<p>Addition of user '.$id.' to group '.$_POST['grouplist'].' failed.</p>';
77                         }
78                     } else {
79                         echo '<p>User '.$id.' is already a member of group '.$_POST['grouplist'].'.</p>';
80                     }
81                 } else {
82                     echo '<p>Group '.$_POST['grouplist'].' does not exist.</p>';
83                 }
84             }    
85             
86             // Remove a user from a group
87             if ($prefix == 'chk' && is_numeric($id) && $value == 'on' && isset($_POST['submit_removeusersfromgroup'])) {
88                 if (($group_id = liveuser_checkEntity('group', $_POST['grouplist'])) !== false) {
89                     if ($liveuserPermAdmin->removeUserFromGroup($id, liveuser_checkEntity('group', $_POST['grouplist']))) {
90                         echo '<p>User '.$id.' was successfully removed from group '.$_POST['grouplist'].'.</p>';        
91                     } else {
92                         echo '<p>Removal of user '.$id.' from group '.$_POST['grouplist'].' failed.</p>';
93                     }
94                 } else {
95                     echo '<p>Group '.$_POST['grouplist'].' does not exist.</p>';
96                 }
97             }
98             
99             // Change the user name
100             if ($prefix == 'chname' && is_numeric($id) && !empty($value) && ($_POST['origname_'.$id] != $value) && isset($_POST['submit_changeusers'])) {           
101               $event_log='';
102                 if (liveuser_checkEntity('user', $value) === false) {
103                     if ($liveuserAuthAdmin->updateUser($id, $value)) {      
104                     $event_log.='<p>User '.$value.' was successfully updated.</p>';
105                     if(isset($ewiki_plugins['uservars_store'][0])){
106                       if($ewiki_plugins['uservars_store'][0]($ewiki_plugins['uservars_retrieve'][0]($_POST['origname_'.$id]),$value)){
107                         $event_log.='<p>User data copied to '.$value;
108                         if($ewiki_plugins['uservars_store'][0](array(),$_POST['origname_'.$id])){
109                           $event_log.= ' and deleted from '.$_POST['origname_'.$id];
110                     } else {
111                           $event_log.= ' but not deleted from '.$_POST['origname_'.$id];                          
112                     }
113                         $event_log.= '.</p>';                          
114                 } else {
115                         $event_log.= '<p>User data copy failed.</p>';                        
116                 }       
117                     }
118                   } else {
119                     $event_log.= '<p>Update of user '.$value.' failed.</p>';
120                   }
121               } else {
122                   $event_log.= '<p>Another user with the name '.$value.' already exists in the database. No change has been made.</p>';
123               } 
124               echo($event_log);
125               ewiki_log("Attempted to rename ".$_POST['origname_'.$id]." to $value.".$event_log,1);
126             }
127             
128             // Change user variable
129             if ($prefix == 'chuvar' && is_numeric($id) && !empty($value) && ($_POST['origchuvar_'.$id] != $value) && isset($_POST['submit_changeusers'])) {      
130               if(ewiki_set_uservar($_POST['uvar_fieldname'], $value, $username)){
131                 echo "<p>UserVar ".$_POST['uvar_fieldname']." successfully updated for $username</p>";
132               } else {
133                 echo "<p>Update of UserVar ".$_POST['uvar_fieldname']." for $username failed.</p>";
134               }
135             }
136             
137             if ($prefix == "radpw" && is_numeric($id) && !empty($value) && isset($_POST['submit_changeusers'])) {
138               if ($value=="expire" && ($pwdstatus=='good' || is_null($pwdstatus))){
139                 ewiki_set_uservar("passwdexpiredate", time(),$username);
140                 ewiki_set_uservar("passwdstatus", 'expired', $username);
141               } elseif($value=="good" && ($pwdstatus=='expired' || is_null($pwdstatus))){
142                 ewiki_set_uservar("passwdexpiredate", time()+(60*60*24*EWIKI_PASSWD_LIFETIME),$username);
143                 ewiki_set_uservar("passwdstatus", 'good', $username);
144               }
145             }
146             
147             if ($prefix == 'chkrandpw' && is_numeric($id) && !empty($value) && isset($_POST['submit_changeusers'])) {
148                 $password=liveuser_generate_password();
149                 
150                 if ($liveuserAuthAdmin->updateUser($id, $_POST['chname_'.$id], $password)) {
151                     ewiki_set_uservar("passwdexpiredate", time()-(60*60*24*EWIKI_PASSWD_LIFETIME),$username);
152                     ewiki_set_uservar("passwdstatus", 'expired', $username);
153                     echo '<p>Password for user '.$_POST['chname_'.$id]." was successfully updated to \"$password\" and set to expire in ".EWIKI_PASSWD_LIFETIME."days.</p>";
154                 } else {
155                     echo '<p>Update of password for user '.$_POST['chname_'.$id].' failed.</p>';
156                 }
157             }
158             
159             // Change the user's password
160             if ($prefix == 'chpw' && is_numeric($id) && !empty($value) && isset($_POST['submit_changeusers'])) {
161                 // check for cracklib functions and validate against them if possible
162                 liveuser_admin_users_cracklib_check($_POST['chname_'.$id], $value);
163                 
164                 if ($liveuserAuthAdmin->updateUser($id, $_POST['chname_'.$id], $value)) {
165                     ewiki_set_uservar("passwdexpiredate", time()-(60*60*24*EWIKI_PASSWD_LIFETIME),$username);
166                     ewiki_set_uservar("passwdstatus", 'expired', $username);
167                     echo '<p>Password for user '.$_POST['chname_'.$id].' was successfully updated and set to expire in '.EWIKI_PASSWD_LIFETIME.'days.</p>';
168                 } else {
169                     echo '<p>Update of password for user '.$_POST['chname_'.$id].' failed.</p>';
170                 }
171             }
172             
173             // Remove a group
174             if ($prefix == 'chkgroup' && is_numeric($id) && $value == 'on' && isset($_POST['submit_changegroups'])) {
175                 if (liveuser_removeEntity('group_id', $id)) {
176                     echo '<p>Group '.$id.' was successfully deleted.</p>';
177                 } else {
178                     echo '<p>Deletion of group '.$id.' failed.</p>';
179                 }
180             }
181             
182             // Change group name
183             if ($prefix == 'chgroupname' && is_numeric($id) && !empty($value) && ($_POST['origgroupname_'.$id] != $value) && isset($_POST['submit_changegroups'])) {    
184                 if ($liveuserPermAdmin->updateGroup($id, $value)) {         
185                     echo '<p>Group '.$value.' was successfully updated.</p>';
186                 }  else {
187                     echo 'Update of group '.$value.' failed.</p>';
188                 }       
189             }
190         }
191     }
192     
193     // Add a user
194     if (!empty($_POST['username_text']) && !empty($_POST['pw_text']) && isset($_POST['submit_adduser'])) {
195         if (liveuser_checkEntity('user', $_POST['username_text']) === false) {
196             // check for cracklib functions and validate against them if possible
197             liveuser_admin_users_cracklib_check($_POST['chname_'.$id], $value);
198             
199             if (liveuser_addEntity('user', array($_POST['username_text'], $_POST['pw_text'])) !== false) {                
200                 echo '<p>User '.$_POST['username_text'].' was successfully created.</p>';    
201             } else {
202                 echo '<p>Creation of user '.$_POST['username_text'].' failed.</p>';
203             }
204         } else {
205             echo '<p>User '.$_POST['username_text'].' already exists.</p>';
206         }       
207     }
208     
209     // Add a lot of users and add them into groups
210     if (!empty($_POST['usernames_text']) && isset($_POST['submit_addusers'])) {    
211         $newusers = explode("\n", $_POST['usernames_text']);
212         
213         foreach ($newusers as $newuser) {
214             $newuser = trim($newuser);
215                     
216             if (($auth_id = liveuser_checkEntity('user', $newuser)) === false) {            
217         if ($_POST["pwgen_addusers"]=="on"){
218             $password=liveuser_generate_password();
219         }else{
220             $password=$newuser;
221         }
222                 if (($auth_id = liveuser_addEntity('user', array($newuser, $password))) !== false) {
223                     echo "<p>User $newuser was successfully created with password $password.</p>";
224                 } else {
225                     echo '<p>Creation of user '.$newuser.' failed.</p>';
226                 }
227             } else {
228                 echo '<p>User '.$newuser.' already exists.</p>';
229             }
230                 
231             if ($auth_id !== false && !empty($_POST['usernames_grouplist'])) {
232                 if (($group_id = liveuser_checkEntity('group', $_POST['usernames_grouplist'])) !== false) {
233                     if (liveuser_checkGroupUser($group_id, $auth_id) === false) {
234                         if ($liveuserPermAdmin->addUserToGroup($auth_id, $group_id)) {
235                             echo '<p>User '.$newuser.' was successfully added to group '.$_POST['usernames_grouplist'].'.</p>';
236                         } else {
237                             echo '<p>Addition of user '.$newuser.' to group '.$_POST['usernames_grouplist'].' failed.</p>';
238                         }
239                     } else {
240                         echo '<p>User '.$newuser.' is already a member of group '.$_POST['usernames_grouplist'].'.</p>';
241                     }
242                 } else {
243                     echo '<p>Group '.$_POST['usernames_grouplist'].' does not exist.</p>';
244                 }
245             }
246         }    
247     }
248
249     // Add a group
250     if (!empty($_POST['groupname_text']) && isset($_POST['submit_addgroup'])) {
251         $group_id = liveuser_checkEntity('group', $_POST['groupname_text']);
252         
253         if ($group_id === false) {
254             $group_const = 'LU_G_'.strtoupper($_POST['groupname_text']);
255             $group_id = liveuser_addEntity('group', array($group_const, $_POST['groupname_text'], null, true));
256             
257             if ($group_id !== false) {
258                 echo '<p>Group '.$_POST['groupname_text'].' was successfully created.</p>'; 
259             } else {
260                 echo '<p>Creation of group '.$_POST['groupname_text'].' failed.</p>';
261             }
262         } else {
263             echo '<p>Group '.$_POST['groupname_text'].' already exists.</p>';
264         }
265
266         if (isset($_POST['addright']) && $group_id !== false) { 
267             $right_id = liveuser_checkEntity('right', $_POST['groupname_text']);
268             
269             if ($right_id === false) {
270                 $right_const = 'LU_R_'.strtoupper($_POST['groupname_text']);
271                 $right_id = liveuser_addEntity('right', array(LU_AREA_LIVEWEB, $right_const, $_POST['groupname_text']));
272                 
273                 if ($right_id !== false) {
274                     echo '<p>Right '.$_POST['groupname_text'].' was successfully created.</p>';
275                 } else {
276                     echo '<p>Creation of right '.$_POST['groupname_text'].' failed.</p>';
277                 }
278             } else {
279                 echo '<p>Right '.$_POST['groupname_text'].' already exists.</p>';
280             }
281             
282             if ($right_id !== false) {
283                 // check if group already has the right
284                 if (liveuser_checkGroupRight($group_id, $right_id)) {
285                     echo 'Group '.$_POST['groupname_text'].' already has right '.$_POST['groupname_text'].'.</p>';
286                 } else {
287                     // attempt to assign right to group
288                     if ($liveuserPermAdmin->grantGroupRight($group_id, $right_id, 1) === true) {
289                         echo '<p>Right '.$_POST['groupname_text'].' has been assigned to group '.$_POST['groupname_text'].'.</p>';
290                     } else {
291                         echo '<p>Assignment of right '.$_POST['groupname_text'].' to group '.$_POST['groupname_text'].' failed.</p>';
292                     }
293                 }
294             }
295         }
296     }
297             
298     // Show current table listing of pages and permissions
299     $users = $liveuserAuthAdmin->getUsers();
300     $groups = $liveuserPermAdmin->getGroups();
301     
302     
303     //uservars based controls
304     if(isset($ewiki_plugins['uservars_search'][0])){
305       if(isset($_REQUEST['search_fieldname'])){ //set fieldname variable
306         $fieldname=$_REQUEST['search_fieldname'];
307       }
308       if(strlen($_REQUEST['search_fieldvalue'])){ //set fieldvalue variable
309         $fieldvalue=$_REQUEST['search_fieldvalue'];
310       }
311       if(!empty($fieldname)){
312         $userdata = ewiki_search_uservar($fieldname, $fieldvalue); //get data for the given fieldname/fieldvalue combination
313       
314         //Remove non-matching users
315         foreach ($users as $key=>$user) {
316           if(!isset($userdata[$user['handle']])){
317             unset($users[$key]);
318           }
319         }
320       }
321
322       //Display search form
323       ?>
324       <form method="post" action="">
325         <table>
326           <tr><td>Field Name</td><td>
327                         <input type="text" name="search_fieldname" value="<?=$fieldname?>">
328                         </td></tr>
329           <tr><td>Value</td><td>
330                         <input type="text" name="search_fieldvalue" value="<?=$fieldvalue?>">
331                         </td></tr>
332         </table>
333         <input value="Search" type="submit" name="submit_searchaccount" />
334       </form>
335       
336       <?
337     }
338     
339     
340     if (is_array($users) && !empty($users)) {
341         ?>
342             <form method="post" action="">
343             <h3>Edit Users</h3>
344       <input type="hidden" name="uvar_fieldname" value="<?=$fieldname?>">
345             <table border="1">
346             <tr><th>Select</th><th>User ID</th><th>User Name<br />Password [Random]</th><th>Password Status</th><th>Groups</th>
347         <?php
348   if(!empty($fieldname)){?>
349
350     <th><?=$fieldname?>                         
351                 <input type="hidden" name="search_fieldname" value="<?=$fieldname?>">
352                 <input type="hidden" name="search_fieldvalue" value="<?=$fieldvalue?>">
353                 </th>
354         <?php
355   }  
356   echo('</tr>');
357         foreach ($users as $user) {
358             ?>
359                 <tr>
360                     <td><input name="chk_<?=$user['auth_user_id']?>" type="checkbox" /></td>
361                     <td><?=$user['auth_user_id']?></td>
362                     <td>
363                         <input id="chname_<?=$user['auth_user_id']?>" name="chname_<?=$user['auth_user_id']?>" type="text" value="<?=$user['handle']?>" />
364                         <input name="origname_<?=$user['auth_user_id']?>" type="hidden" value="<?=$user['handle']?>"><br />
365                         
366                         <input id="chpw_<?=$user['auth_user_id']?>" name="chpw_<?=$user['auth_user_id']?>" type="text" value="" />
367                         <input name="chkrandpw_<?=$user['auth_user_id']?>" type="checkbox" />
368                         <?=($liveuserAuthAdmin->encryptPW($user['handle']) == $user['passwd'] ? '<div class="warning">Password == User Name</div>' : '')?>                        
369                     </td>
370                     <td>
371                     <?
372                     $good='<input type="radio" name="radpw_'.$user["auth_user_id"].'" value="good" CHECKED >Good<br />'.
373                             '<input type="radio" name="radpw_'.$user["auth_user_id"].'" value="expire">Expired<br />';
374                     $expired='<input type="radio" name="radpw_'.$user["auth_user_id"].'" value="good">Good<br />'.
375                             '<input type="radio" name="radpw_'.$user["auth_user_id"].'" value="expire" CHECKED >Expired<br />';
376                     echo (ewiki_get_uservar("passwdstatus", 'good', $user['handle'])=='good' ? $good : $expired);
377                     echo intval((ewiki_get_uservar("passwdexpiredate", time(), $user['handle'])-time())/(60*60*24))." Days<br />";
378                     ?>
379                     </td>
380                     <td>
381             <?php
382             
383             foreach ($liveuserPermAdmin->getGroups(array('where_user_id' => $user['auth_user_id'])) as $group) {
384                 echo $group['name'].'<br />';
385             }
386             
387             ?>
388                     </td>
389                 
390             <?php
391     if(isset($userdata[$user['handle']])){
392       echo ('<input id="origchuvar_'.$user['auth_user_id'].'" name="origchuvar_'.$user['auth_user_id'].'" type="hidden" value="'.$userdata[$user['handle']].'">');
393       echo('<td> <input id="chuvar_'.$user['auth_user_id'].'" name="chuvar_'.$user['auth_user_id'].'" type="text" value="'.$userdata[$user['handle']].'" /></td>');
394     }
395     echo("</tr>");
396         }    
397         
398         ?>
399             </table>
400             <input type="reset" value="Reset" />
401             <input type="submit" name="submit_deleteusers" value="Delete Selected" />
402             <input type="submit" name="submit_changeusers" value="Submit Changes" />
403         <?php
404         
405         if (is_array($groups) && !empty($groups)) {
406             ?>
407                 <br /><br /><label for="grouplist">Group</label>
408                 <select id="grouplist" name="grouplist">
409             <?php
410             
411             foreach ($groups as $group) {
412                 echo '<option value="'.$group['name'].'">'.$group['name'].'</option>';
413             }
414             
415             ?>
416                 </select><br />
417                 <input type="submit" name="submit_adduserstogroup" value="Add Selected" />
418                 <input type="submit" name="submit_removeusersfromgroup" value="Remove Selected" />
419             <?php
420         }
421         
422         echo '</form>';
423     } else {
424         ?>
425             <h3>Edit Users</h3>
426             <p>No users were found in the database.</p>
427         <?php
428     }   
429     
430     // Show Add a new user section
431     ?>
432         <form method="post" action="">
433         <h3>Add a User</h3>
434         <label for="username_text">User Name</label>
435         <input id="username_text" name="username_text" type="text" /><br />
436         <label for="pw_text">Password</label>
437         <input id="pw_text" name="pw_text" type="text" /><br />
438         <input type="submit" name="submit_adduser" value="Add User" />
439         </form>
440     <?php
441         
442     // Show Add multiple users section
443     ?>
444         <form method="post" action="">
445         <h3>Add Multiple Users</h3>
446         <p>Insert one user name per line. This input will be processed as a 
447         batch, and each user will be created with a password identical to his 
448         user name or a randomly generated password if the "Generate Passwords" 
449         box is checked.</p>
450         <textarea id="usernames_text" name="usernames_text" rows="10" cols="25"></textarea>    
451     <?php
452     
453     if (is_array($groups) && !empty($groups)) {
454         ?>
455             <label for="usernames_grouplist">Groups</label>
456             <select id="usernames_grouplist" name="usernames_grouplist" />
457             <option value=""></option>
458         <?php
459         
460         foreach ($groups as $group) {
461             echo '<option value="'.$group['name'].'">'.$group['name'].'</option>';
462         }
463         
464         ?>
465             </select>
466         <?php
467     }
468     
469     ?>
470         <p><input type="checkbox" name="pwgen_addusers" checked="checked"> Generate random passwords.</p>
471         <input type="submit" name="submit_addusers" value="Add Users" />    
472         </form>
473     <?php
474     
475     // Groups Section
476     if (is_array($groups) && !empty($groups)) {
477         ?>
478             <form method="post" action="">
479             <h3>Edit Groups</h3>
480             <table border="1">
481             <tr><th>Delete</th><th>Group ID</th><th>Group Name</th></tr>
482         <?php
483         
484         foreach ($groups as $group) {   
485             ?>
486                 <tr>
487                     <td><input name="chkgroup_<?=$group['group_id']?>" type="checkbox" /></td>
488                     <td><?=$group['group_id']?></td>
489                     <td>
490                         <input name="chgroupname_<?=$group['group_id']?>" type="text" value="<?=$group['name']?>" />
491                         <input name="origgroupname_<?=$group['group_id']?>" type="hidden" value="<?=$group['name']?>" />
492                     </td>
493                 </tr>
494             <?php
495         }
496         
497         ?>
498             </table>
499             <input type="reset" value="Reset" />
500             <input name="submit_changegroups" type="submit" value="Submit Changes">
501             </form>
502         <?php
503     } else {
504         ?>
505             <h3>Edit Groups</h3>
506             <p>No groups were found in the database.</p>
507         <?php
508     }
509     
510     // Show Add a new group section
511     ?>
512         <form method="post" action="">
513         <h3>Add a Group</h3>
514         <p>When creating a group, you may choose to create a right with the group, which may then be applied to user accounts via the group. If the group already exists, this form will still attempt to link a right to it. If the right already exists and is not associated with the group, it will be assigned to the group.</p>
515         <label for="groupname_text">Group Name</label>
516         <input id="groupname_text" name="groupname_text" type="text"><br />
517         <label for="addright">Add/Link Right</label>
518         <input id="addright" name="addright" type="checkbox" checked="checked"><br />
519         <input type="submit" name="submit_addgroup" value="Add Group" />
520         </form>
521     <?php
522         
523     $o = ob_get_contents();
524     ob_end_clean();
525     return $o;     
526 }
527
528 /**
529  * checks password with cracklib and outputs warning message if insecure.
530  *
531  * @param string username
532  * @param string password
533  */
534 function liveuser_admin_users_cracklib_check($username, $password)
535 {
536     if (extension_loaded('crack') && function_exists('crack_check') && function_exists('crack_getlastmessage')) {
537         crack_check($value);
538         
539         if (crack_getlastmessage() != "strong password") {
540             echo '<p>Password for user '.$username.' is not secure, cracklib reports: '.crack_getlastmessage().'.</p>';
541         }
542     }
543     
544     //Jeff's password checker, copied from auth_liveuser.php
545     $password_status=ewiki_check_passwd($password,$username);
546     //$end=getmicrotime();
547     //echo($end-$time);
548     if ($password_status!='good passwd') {
549       if($password_status=='read error'){
550         echo ewiki_t('PASS_DICTIONARY_READ_ERROR');
551       } else {
552         echo ewiki_t($password_status);
553       }
554     }
555 }
556
557 ?>