summaryrefslogtreecommitdiffstats
path: root/generated-classes
diff options
context:
space:
mode:
Diffstat (limited to 'generated-classes')
-rw-r--r--generated-classes/User.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/generated-classes/User.php b/generated-classes/User.php
index 0602db9..c531950 100644
--- a/generated-classes/User.php
+++ b/generated-classes/User.php
@@ -14,6 +14,9 @@ use Base\User as BaseUser;
*/
class User extends BaseUser
{
+ /* (non-PHPdoc)
+ * @see \Base\User::setPassword()
+ */
public function setPassword($v)
{
if(parent::getSalt() == null)
@@ -23,6 +26,13 @@ class User extends BaseUser
return parent::setPassword(self::createHash($v));
}
+ /**
+ * A function to check a password against a given string.
+ *
+ * @param string $v The password to check.
+ * @return boolean
+ * If password equals $v
+ */
public function checkPassword($v)
{
if(parent::getSalt() == null)
@@ -33,6 +43,13 @@ class User extends BaseUser
return self::createHash($v) == parent::getPassword();
}
+ /**
+ * Create a password hash with sha-1
+ *
+ * @param string $v The password to hash
+ * @return string
+ * The hashed and salted password
+ */
private function createHash($v)
{
return sha1(parent::getSalt() . $v);