Removes confusing reset button.
[platal.git] / classes / user.php
index eb112ca..8b9e141 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2008 Polytechnique.org                              *
+ *  Copyright (C) 2003-2009 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -186,6 +186,14 @@ class User extends PlUser
         $this->perm_flags = self::makePerms($this->perms);
     }
 
+    // Return the password of the user
+    public function password()
+    {
+        return XDB::fetchOneCell('SELECT  u.password
+                                    FROM  auth_user_md5 AS u
+                                   WHERE  u.user_id = {?}', $this->id());
+    }
+
     // Return permission flags for a given permission level.
     public static function makePerms($perms)
     {