]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - includes/auth.php
Pie aspect ratio fix
[Github/YOURLS.git] / includes / auth.php
1 <?php
2 $auth = yourls_apply_filter( 'is_valid_user', yourls_is_valid_user() );
3
4 if( $auth !== true ) {
5
6         // API mode, 
7         if ( yourls_is_API() ) {
8                 $format = ( isset($_REQUEST['format']) ? $_REQUEST['format'] : 'xml' );
9                 yourls_api_output( $format, array(
10                         'simple' => $auth,
11                         'message' => $auth,
12                         'errorCode' => 403,
13                         ) );
14
15         // Regular mode
16         } else {
17                 yourls_login_screen( $auth );
18         }
19         
20         die();
21 }