plugins/admin/UserManager.php
changeset 832 7152ca0a0ce9
parent 801 eb8b23f11744
child 928 e2971f4a3123
--- a/plugins/admin/UserManager.php	Mon Feb 16 16:04:54 2009 -0500
+++ b/plugins/admin/UserManager.php	Mon Feb 16 16:17:25 2009 -0500
@@ -56,6 +56,9 @@
       $q = $db->sql_query('DELETE FROM '.table_prefix."users WHERE user_id=$user_id;");
       if ( !$q )
         $db->_die();
+      $q = $db->sql_query('DELETE FROM '.table_prefix."session_keys WHERE user_id=$user_id;");
+      if ( !$q )
+        $db->_die();
       echo '<div class="info-box">' . $lang->get('acpum_msg_delete_success') . '</div>';
     }
     else
@@ -116,7 +119,7 @@
         $imaddr_msn = "$imaddr_msn@hotmail.com";
       }
       
-      if ( substr($homepage, 0, 7) != 'http://' )
+      if ( !preg_match('#^https?://#', $homepage) )
       {
         $homepage = "http://$homepage";
       }
@@ -149,8 +152,7 @@
           $to_update_users['username'] = $username;
           if ( $password )
           {
-            $password = $session->pk_encrypt($password, ENC_HEX);
-            $to_update_users['password'] = $password;
+            $session->set_password($user_id, $password);
           }
           $to_update_users['email'] = $email;
           $to_update_users['real_name'] = $real_name;