function setPassword($password)
    {
        // TODO: maso, 2017: check password
        $salt = Pluf_Utils::getRandomString(5);
        $this->password = 'sha1:' . $salt . ':' . sha1($salt . $password);
        return true;
    }
function setPassword($password)
    {
        // TODO: maso, 2017: check password
        $salt = Pluf_Utils::getRandomString(5);
        $this->password = 'sha1:' . $salt . ':' . sha1($salt . $password);
        return true;
    }
function setPassword ( $ password ) { // TODO: maso, 2017: check password $ salt = Pluf_Utils :: getRandomString ( 5 ) ; $ this -> password = 'sha1:' . $ salt . ':' . sha1 ( $ salt . $ password ) ; return true ; }
Set the password of a user.

You need to manually save the user to store the password in the
database. The supported algorithms are md5, crc32 and sha1,
sha1 being the default.

@param
string New password
@return bool Success
Set the password of a user .