Exemple #1
0
         } else {
             if (!$group->is_member($show_member)) {
                 $show_member = FALSE;
                 $problems .= gettext("Not a member");
                 $hints .= str_replace("%LOGIN", $_POST["choosemember"]["login"], gettext("User with login '%LOGIN' is not a member of the participant group of this pointlist"));
             }
         }
     }
 }
 if (isset($_POST["choosemember_mnr"]) && isset($_POST["choosemember"]["mnr"])) {
     $show_matriculationnumber = TRUE;
     if (strlen(trim($_POST["choosemember"]["mnr"])) == 0) {
         $problems .= gettext("Matriculation number is missing");
         $hints .= gettext("Please enter a matriculation number to search for");
     } else {
         if (units_pointlist::check_matriculation_number($_POST["choosemember"]["mnr"]) === FALSE) {
             $problems .= gettext("Invalid Matriculation number.") . " ";
             $hints .= str_replace("%MNR", $_POST["choosemember"]["mnr"], gettext("The Matriculationnumber '%MNR' seems to be invalid.") . " ");
             $mnr_invalid = TRUE;
         } else {
             $display_member_value = $_POST["choosemember"]["mnr"];
             $ldaperror = FALSE;
             // Find user using the Matriculation number
             try {
                 $loginname = ldap_mnr2login(trim($_POST["choosemember"]["mnr"]));
             } catch (Exception $e) {
                 $ldaperror = TRUE;
                 $problems .= gettext("Matriculation number not found");
                 $hints .= str_replace("%ERROR", $e->getMessage(), gettext("An error occured during LDAP access. The error message is '%ERROR'"));
             }
             if (!$ldaperror) {