nextcloud/help/index.php

35 lines
787 B
PHP
Raw Normal View History

2011-04-16 19:49:57 +04:00
<?php
require_once('../lib/base.php');
require( 'template.php' );
if( !OC_USER::isLoggedIn()){
header( "Location: ".OC_HELPER::linkTo( "index.php" ));
exit();
}
2011-04-16 20:06:23 +04:00
OC_APP::setActiveNavigationEntry( "help" );
2011-04-16 19:49:57 +04:00
$settings = array();
// Do the work ...
if( $_POST["submit"] )
{
if( $_POST["newpassword"] != $_POST["newpasswordconfirm"] ){
// Say "Passwords not equal"
}
else{
if( OC_USER::checkPassword( $_SESSION["username"], $_POST["password"] )){
// Set password
OC_USER::setPassord( $_SESSION["username"], $_POST["newpassword"] );
}
else{
// Say "old password bad"
}
}
}
$tmpl = new OC_TEMPLATE( "help", "index", "user" );
$tmpl->assign( "settings", $settings );
$tmpl->printPage();
?>