Example #1
0
    </div>
    <p>
        <input class="btn" type="submit" value="Sign In">
<?php 
if ($suggest_pwreset) {
    ?>
        <a style="padding-top:4px;display:inline-block;" href="pwreset.php">Forgot My Password</a>
<?php 
}
?>
    </p>
    </div>
    <div style="display:table-cell;padding: 15px;vertical-align:top">
<?php 
$ext_bks = array();
foreach (UserAuthenticationBackend::allRegistered() as $bk) {
    if ($bk instanceof ExternalAuthentication) {
        $ext_bks[] = $bk;
    }
}
if (count($ext_bks)) {
    foreach ($ext_bks as $bk) {
        ?>
<div class="external-auth"><?php 
        $bk->renderExternalLink();
        ?>
</div><?php 
    }
}
if ($cfg && $cfg->isClientRegistrationEnabled()) {
    if (count($ext_bks)) {
     <td>
 <select name="backend" id="backend-selection" onchange="javascript:
     if (this.value != '' && this.value != 'client') {
         $('#activation').hide();
         $('#password').hide();
     }
     else {
         $('#activation').show();
         if ($('#sendemail').is(':checked'))
             $('#password').hide();
         else
             $('#password').show();
     }
     ">
     <option value="">&mdash; Use any available backend &mdash;</option>
 <?php foreach (UserAuthenticationBackend::allRegistered() as $ab) {
     if (!$ab->supportsInteractiveAuthentication()) continue; ?>
     <option value="<?php echo $ab::$id; ?>" <?php
         if ($info['backend'] == $ab::$id)
             echo 'selected="selected"'; ?>><?php
         echo $ab::$name; ?></option>
 <?php } ?>
 </select>
     </td>
 </tr>
 <tr>
     <td width="180">
         Username:
     </td>
     <td>
         <input type="text" size="35" name="username" value="<?php echo $info['username'] ?: $user->getEmail(); ?>">
Example #3
0
 static function getSearchDirectories()
 {
     $backends = array();
     foreach (StaffAuthenticationBackend::allRegistered() as $bk) {
         if ($bk instanceof AuthDirectorySearch) {
             $backends[$bk::$id] = $bk;
         }
     }
     foreach (UserAuthenticationBackend::allRegistered() as $bk) {
         if ($bk instanceof AuthDirectorySearch) {
             $backends[$bk::$id] = $bk;
         }
     }
     return array_unique($backends);
 }