Beispiel #1
0
 public function usersessions_delete($params = null)
 {
     // aka logout
     if ($params && is_array($params) && isset($params["__partial"])) {
         return null;
     }
     if ($params === null) {
         $this->requireRequestType("DELETE");
     }
     $usersession = new SCUserSession();
     if ($usersession->destroy()) {
         return array("loggedout" => true);
     } else {
         throw new APIException("Username or Password are Incorrect", 401);
     }
 }
 static function loggedInUser()
 {
     $user_session = new SCUserSession();
     return $user_session->getSessionUser();
 }
Beispiel #3
0
require_once "config/config.php";
require_once "lib/SC.php";
require_once "lib/SCBase.php";
require_once "lib/SCBlock.php";
require_once "lib/SCDB.php";
require_once "lib/SCUserSession.php";
require_once "lib/SCUser.php";
require_once "lib/SCMessage.php";
require_once "lib/SCThread.php";
require_once "lib/SCBoard.php";
require_once "lib/SCInvite.php";
require_once "lib/SCBoardSet.php";
require_once "lib/SCMembershipSet.php";
require_once "lib/SCMembership.php";
require_once "lib/SCEmail.php";
require_once "lib/SCEmailParser.php";
require_once "lib/SCAsset.php";
require_once "lib/SCViewed.php";
require_once "lib/SCPartial.php";
require_once "lib/SCLayout.php";
require_once "lib/SCRoutes.php";
require_once "api/SCApi.php";
$current_user = null;
if (!isset($from_email)) {
    $user_session = new SCUserSession();
    $current_user = $user_session->getSessionUser();
    if (!$current_user->existing) {
        $current_user = null;
    }
}
//$current_user = SCUserSession::loggedInUser();