X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2Fpluser.php;h=d0e7e646d6b2e32d8cd3e4759496bbedb0df7465;hb=52af4d0fca738d444e4daac9fe279ced195d2922;hp=187f131a63df7ad38b74c38ec7c6bbe1ad26642a;hpb=7e001f68b7928d80ccf32b8a8bca55d304476d3e;p=platal.git diff --git a/classes/pluser.php b/classes/pluser.php index 187f131..d0e7e64 100644 --- a/classes/pluser.php +++ b/classes/pluser.php @@ -1,6 +1,6 @@ hruid; } + public function isMe($other) + { + if (!$other) { + return false; + } else if ($other instanceof PlUser) { + return $other->id() == $this->id(); + } else { + return false; + } + } + public function bestEmail() { if (!empty($this->bestalias)) { @@ -415,7 +426,7 @@ abstract class PlUser implements PlUserInterface public static function makeHrid($firstname, $lastname, $category) { $cat = self::stripBadChars($category); - if (!cat) { + if (!$cat) { Platal::page()->kill("$category is not a suitable category."); }