fetch the password of a user but we don't want to store this password
in the session (or whatever).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
class MMList extends XmlrpcClient
{
- public function __construct($uid, $pass, $fqdn = null)
+ public function __construct($user, $pass = null, $fqdn = null)
{
global $globals;
+ if ($user instanceof PlUser) {
+ $fqdn = $pass;
+ $uid = $user->id();
+ $pass = $user->password();
+ } else {
+ $uid = $user;
+ }
$dom = is_null($fqdn) ? $globals->mail->domain : $fqdn;
$url = "http://$uid:$pass@{$globals->lists->rpchost}:{$globals->lists->rpcport}/$dom";
return $this->promo;
}
+ abstract public function password();
+
// Fallback value is GENDER_MALE.
public function isFemale()
{