show error on openid request page when no user is selected
This commit is contained in:
parent
2772c66259
commit
1aa8399915
|
@ -560,7 +560,9 @@ function logout_mode () {
|
||||||
* @global array $profile
|
* @global array $profile
|
||||||
*/
|
*/
|
||||||
function no_mode () {
|
function no_mode () {
|
||||||
|
global $USERNAME;
|
||||||
$tmpl = new OC_TEMPLATE( 'user_openid', 'nomode', 'guest' );
|
$tmpl = new OC_TEMPLATE( 'user_openid', 'nomode', 'guest' );
|
||||||
|
$tmpl->assign('user',$USERNAME);
|
||||||
$tmpl->printPage();
|
$tmpl->printPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1669,7 +1671,7 @@ if (! array_key_exists('auth_domain', $profile))
|
||||||
|
|
||||||
// Set a default authentication realm
|
// Set a default authentication realm
|
||||||
if (! array_key_exists('auth_realm', $profile))
|
if (! array_key_exists('auth_realm', $profile))
|
||||||
$profile['auth_realm'] = 'phpMyID';
|
$profile['auth_realm'] = 'ownCloud';
|
||||||
|
|
||||||
// Determine the realm for digest authentication - DO NOT OVERRIDE
|
// Determine the realm for digest authentication - DO NOT OVERRIDE
|
||||||
$profile['php_realm'] = $profile['auth_realm'] . (ini_get('safe_mode') ? '-' . getmyuid() : '');
|
$profile['php_realm'] = $profile['auth_realm'] . (ini_get('safe_mode') ? '-' . getmyuid() : '');
|
||||||
|
|
|
@ -5,17 +5,22 @@ global $profile;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<img src="<?php echo image_path("", "weather-clear.png"); ?>" alt="ownCloud" />
|
<img src="<?php echo image_path("", "owncloud-logo-medium-white.png"); ?>" alt="ownCloud" />
|
||||||
<ul>
|
<ul>
|
||||||
<li class='error'>
|
<li class='error'>
|
||||||
<div id="setup_form">
|
<div id="setup_form">
|
||||||
<p><?php echo($l->t('This is an OpenID server endpoint. For more information, see http://openid.net/'));?></p>
|
<p><?php echo($l->t('This is an OpenID server endpoint. For more information, see '));?><a href='http://openid.net/' title='openid.net'>http://openid.net/</a></p>
|
||||||
<p><?php echo($l->t('Server: <b>').$profile['idp_url']); ?></b>
|
<?php if($_['user']):?>
|
||||||
<p><?php echo($l->t('Realm: <b>').$profile['php_realm']); ?></b>
|
<p><?php echo($l->t('Identity: <b>').$profile['idp_url']); ?></b></p>
|
||||||
|
<p><?php echo($l->t('Realm: <b>').$profile['php_realm']); ?></b></p>
|
||||||
|
<p><?php echo($l->t('User: <b>').$_['user']); ?></b>
|
||||||
<p><a href="<?php echo($profile['idp_url']); ?>?openid.mode=login"><?php echo($l->t('Login')); ?></a>
|
<p><a href="<?php echo($profile['idp_url']); ?>?openid.mode=login"><?php echo($l->t('Login')); ?></a>
|
||||||
<?php if($profile['allow_test'] === true){ ?>
|
<?php if($profile['allow_test'] === true): ?>
|
||||||
| <a href="<?php echo($profile['idp_url']); ?>?openid.mode=test">Test</a>
|
<a href="<?php echo($profile['idp_url']); ?>?openid.mode=test">Test</a>
|
||||||
<?php } ?>
|
<?php endif; ?>
|
||||||
|
<?php else: ?>
|
||||||
|
<p><?php echo($l->t('Error: <b>No user Selected')); ?></p>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -28,6 +28,10 @@ if(strpos($USERNAME,'?')){
|
||||||
|
|
||||||
require_once '../../lib/base.php';
|
require_once '../../lib/base.php';
|
||||||
|
|
||||||
|
if(!OC_USER::userExists($USERNAME)){
|
||||||
|
$USERNAME='';
|
||||||
|
}
|
||||||
|
|
||||||
require_once 'phpmyid.php';
|
require_once 'phpmyid.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue