2013-04-14 22:41:04 +00:00
|
|
|
<?php
|
2013-05-02 18:28:02 +00:00
|
|
|
// Copyright (c) 2013 Datenstrom, http://datenstrom.se
|
2013-04-14 22:41:04 +00:00
|
|
|
// This file may be used and distributed under the terms of the public license.
|
|
|
|
|
|
|
|
// Web interface core plugin
|
2013-12-01 11:59:07 +00:00
|
|
|
class YellowWebinterface
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
2013-12-21 13:10:15 +00:00
|
|
|
const Version = "0.2.4";
|
2013-07-11 20:33:28 +00:00
|
|
|
var $yellow; //access to API
|
|
|
|
var $users; //web interface users
|
|
|
|
var $activeLocation; //web interface location? (boolean)
|
|
|
|
var $activeUserFail; //web interface login failed? (boolean)
|
|
|
|
var $activeUserEmail; //web interface user currently logged in
|
|
|
|
var $rawDataOriginal; //raw data of page in case of errors
|
2013-04-14 22:41:04 +00:00
|
|
|
|
|
|
|
// Initialise plugin
|
2013-12-01 11:59:07 +00:00
|
|
|
function onLoad($yellow)
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
|
|
|
$this->yellow = $yellow;
|
2013-06-27 17:00:03 +00:00
|
|
|
$this->yellow->config->setDefault("webinterfaceLocation", "/edit/");
|
2013-04-14 22:41:04 +00:00
|
|
|
$this->yellow->config->setDefault("webinterfaceUserFile", "user.ini");
|
2013-12-21 13:10:15 +00:00
|
|
|
$this->users = new YellowWebinterfaceUsers($yellow);
|
2013-04-14 22:41:04 +00:00
|
|
|
$this->users->load($this->yellow->config->get("configDir").$this->yellow->config->get("webinterfaceUserFile"));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Handle web interface location
|
2013-07-29 18:49:57 +00:00
|
|
|
function onRequest($serverName, $serverBase, $location, $fileName)
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
|
|
|
$statusCode = 0;
|
|
|
|
if($this->checkWebinterfaceLocation($location))
|
|
|
|
{
|
2013-07-29 18:49:57 +00:00
|
|
|
$serverBase .= rtrim($this->yellow->config->get("webinterfaceLocation"), '/');
|
2013-12-21 13:10:15 +00:00
|
|
|
list($location, $fileName) = $this->yellow->getRequestLocationFile($serverBase);
|
2013-07-29 18:49:57 +00:00
|
|
|
if($this->checkUser()) $statusCode = $this->processRequestAction($serverName, $serverBase, $location, $fileName);
|
|
|
|
if($statusCode == 0) $statusCode = $this->yellow->processRequest($serverName, $serverBase, $location, $fileName,
|
2013-07-24 10:27:13 +00:00
|
|
|
false, $this->activeUserFail ? 401 : 0);
|
2013-04-14 22:41:04 +00:00
|
|
|
} else {
|
|
|
|
if($this->yellow->config->get("webinterfaceLocation") == "$location/")
|
|
|
|
{
|
|
|
|
$statusCode = 301;
|
2013-07-29 18:49:57 +00:00
|
|
|
$locationHeader = $this->yellow->toolbox->getHttpLocationHeader($serverName, $serverBase, "$location/");
|
|
|
|
$this->yellow->sendStatus($statusCode, $locationHeader);
|
2013-04-14 22:41:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return $statusCode;
|
|
|
|
}
|
|
|
|
|
2013-09-17 09:18:01 +00:00
|
|
|
// Handle page content parsing
|
|
|
|
function onParseContent($page, $text)
|
2013-07-11 20:33:28 +00:00
|
|
|
{
|
2013-08-28 10:01:46 +00:00
|
|
|
$output = NULL;
|
2013-07-11 20:33:28 +00:00
|
|
|
if($this->isWebinterfaceLocation() && $this->isUser())
|
|
|
|
{
|
2013-07-29 18:49:57 +00:00
|
|
|
$serverBase = $this->yellow->config->get("serverBase");
|
2013-07-11 20:33:28 +00:00
|
|
|
$webinterfaceLocation = trim($this->yellow->config->get("webinterfaceLocation"), '/');
|
2013-08-28 10:01:46 +00:00
|
|
|
$output = preg_replace("#<a(.*?)href=\"$serverBase/(?!$webinterfaceLocation)(.*?)\"(.*?)>#",
|
2013-09-27 19:16:29 +00:00
|
|
|
"<a$1href=\"$serverBase/$webinterfaceLocation/$2\"$3>", $text);
|
2013-09-17 09:18:01 +00:00
|
|
|
if($page == $this->yellow->page)
|
2013-07-11 20:33:28 +00:00
|
|
|
{
|
2013-12-11 14:13:38 +00:00
|
|
|
if(empty($this->rawDataOriginal)) $this->rawDataOriginal = $page->rawData;
|
2013-09-17 09:18:01 +00:00
|
|
|
switch($page->statusCode)
|
|
|
|
{
|
|
|
|
case 424: $language = $this->isUser() ? $this->users->getLanguage($this->activeUserEmail) : $page->get("language");
|
|
|
|
$page->rawData = "---\r\n";
|
2013-12-11 14:13:38 +00:00
|
|
|
$page->rawData .= "Title: ".$this->yellow->text->getText("webinterface424Title", $language)."\r\n";
|
2013-09-17 09:18:01 +00:00
|
|
|
$page->rawData .= "Author: ".$this->users->getName($this->activeUserEmail)."\r\n";
|
|
|
|
$page->rawData .= "---\r\n";
|
2013-12-11 14:13:38 +00:00
|
|
|
$page->rawData .= $this->yellow->text->getText("webinterface424Text", $language);
|
2013-09-17 09:18:01 +00:00
|
|
|
break;
|
|
|
|
case 500: $page->rawData = $this->rawDataOriginal; break;
|
|
|
|
}
|
2013-07-11 20:33:28 +00:00
|
|
|
}
|
|
|
|
}
|
2013-08-28 10:01:46 +00:00
|
|
|
return $output;
|
2013-07-11 20:33:28 +00:00
|
|
|
}
|
|
|
|
|
2013-04-14 22:41:04 +00:00
|
|
|
// Handle extra HTML header lines
|
|
|
|
function onHeaderExtra()
|
|
|
|
{
|
|
|
|
$header = "";
|
|
|
|
if($this->isWebinterfaceLocation())
|
|
|
|
{
|
2013-07-29 18:49:57 +00:00
|
|
|
$location = $this->yellow->config->getHtml("serverBase").$this->yellow->config->getHtml("pluginLocation");
|
2013-04-14 22:41:04 +00:00
|
|
|
$language = $this->isUser() ? $this->users->getLanguage($this->activeUserEmail) : $this->yellow->page->get("language");
|
2013-12-01 11:59:07 +00:00
|
|
|
$header .= "<link rel=\"styleSheet\" type=\"text/css\" media=\"all\" href=\"{$location}core-webinterface.css\" />\n";
|
|
|
|
$header .= "<script type=\"text/javascript\" src=\"{$location}core-webinterface.js\"></script>\n";
|
2013-04-14 22:41:04 +00:00
|
|
|
$header .= "<script type=\"text/javascript\">\n";
|
|
|
|
$header .= "// <![CDATA[\n";
|
|
|
|
if($this->isUser())
|
|
|
|
{
|
|
|
|
$header .= "yellow.page.rawData = ".json_encode($this->yellow->page->rawData).";\n";
|
|
|
|
$header .= "yellow.pages = ".json_encode($this->getPagesData()).";\n";
|
|
|
|
$header .= "yellow.config = ".json_encode($this->getConfigData($this->activeUserEmail)).";\n";
|
|
|
|
}
|
2013-12-11 14:13:38 +00:00
|
|
|
$header .= "yellow.text = ".json_encode($this->yellow->text->getData("webinterface", $language)).";\n";
|
2013-04-14 22:41:04 +00:00
|
|
|
if(defined("DEBUG")) $header .= "yellow.debug = ".json_encode(DEBUG).";\n";
|
|
|
|
$header .= "// ]]>\n";
|
|
|
|
$header .= "</script>\n";
|
|
|
|
}
|
|
|
|
return $header;
|
|
|
|
}
|
|
|
|
|
2013-12-21 13:10:15 +00:00
|
|
|
// Handle command help
|
|
|
|
function onCommandHelp()
|
|
|
|
{
|
|
|
|
return "user EMAIL PASSWORD [NAME LANGUAGE]\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Handle command
|
|
|
|
function onCommand($args)
|
|
|
|
{
|
|
|
|
list($name, $command) = $args;
|
|
|
|
switch($command)
|
|
|
|
{
|
|
|
|
case "user": $statusCode = $this->userCommand($args); break;
|
|
|
|
default: $statusCode = 0;
|
|
|
|
}
|
|
|
|
return $statusCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create or update user
|
|
|
|
function userCommand($args)
|
|
|
|
{
|
|
|
|
$statusCode = 0;
|
|
|
|
list($dummy, $command, $email, $password, $name, $language) = $args;
|
|
|
|
if(!empty($email) && !empty($password) )
|
|
|
|
{
|
|
|
|
$fileName = $this->yellow->config->get("configDir").$this->yellow->config->get("webinterfaceUserFile");
|
|
|
|
$statusCode = $this->users->createUser($fileName, $email, $password, $name, $language) ? 200 : 500;
|
|
|
|
if($statusCode != 200) echo "ERROR updating configuration: Can't write file '$fileName'!\n";
|
|
|
|
echo "Yellow $command: User account ".($statusCode!=200 ? "not " : "");
|
|
|
|
echo ($this->users->isExisting($email) ? "updated" : "created")."\n";
|
|
|
|
} else {
|
|
|
|
echo "Yellow $command: Invalid arguments\n";
|
|
|
|
$statusCode = 400;
|
|
|
|
}
|
|
|
|
return $statusCode;
|
|
|
|
}
|
|
|
|
|
2013-04-14 22:41:04 +00:00
|
|
|
// Process request for an action
|
2013-07-29 18:49:57 +00:00
|
|
|
function processRequestAction($serverName, $serverBase, $location, $fileName)
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
|
|
|
$statusCode = 0;
|
2013-12-05 22:30:45 +00:00
|
|
|
switch($_POST["action"])
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
2013-12-05 22:30:45 +00:00
|
|
|
case "edit": if(!empty($_POST["rawdata"]) && $this->checkUserPermissions($location, $fileName))
|
|
|
|
{
|
|
|
|
$this->rawDataOriginal = $_POST["rawdata"];
|
2013-12-21 13:10:15 +00:00
|
|
|
if($this->yellow->toolbox->createFile($fileName, $_POST["rawdata"]))
|
2013-12-05 22:30:45 +00:00
|
|
|
{
|
|
|
|
$statusCode = 303;
|
|
|
|
$locationHeader = $this->yellow->toolbox->getHttpLocationHeader($serverName, $serverBase, $location);
|
|
|
|
$this->yellow->sendStatus($statusCode, $locationHeader);
|
|
|
|
} else {
|
|
|
|
$statusCode = 500;
|
|
|
|
$this->yellow->processRequest($serverName, $serverBase, $location, $fileName, false, $statusCode);
|
|
|
|
$this->yellow->page->error($statusCode, "Can't write file '$fileName'!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case "login": $statusCode = 303;
|
|
|
|
$locationHeader = $this->yellow->toolbox->getHttpLocationHeader($serverName, $serverBase, $location);
|
|
|
|
$this->yellow->sendStatus($statusCode, $locationHeader);
|
|
|
|
break;
|
|
|
|
case "logout": $this->users->destroyCookie("login");
|
|
|
|
$this->activeUserEmail = "";
|
|
|
|
$statusCode = 302;
|
|
|
|
$locationHeader = $this->yellow->toolbox->getHttpLocationHeader($serverName, $this->yellow->config->get("serverBase"), $location);
|
|
|
|
$this->yellow->sendStatus($statusCode, $locationHeader);
|
|
|
|
break;
|
|
|
|
default: if(!is_readable($fileName))
|
|
|
|
{
|
2013-12-21 13:10:15 +00:00
|
|
|
if($this->yellow->toolbox->isFileLocation($location) && $this->yellow->isContentDirectory("$location/"))
|
2013-12-05 22:30:45 +00:00
|
|
|
{
|
|
|
|
$statusCode = 301;
|
|
|
|
$locationHeader = $this->yellow->toolbox->getHttpLocationHeader($serverName, $serverBase, "$location/");
|
|
|
|
$this->yellow->sendStatus($statusCode, $locationHeader);
|
|
|
|
} else {
|
|
|
|
$statusCode = $this->checkUserPermissions($location, $fileName) ? 424 : 404;
|
|
|
|
$this->yellow->processRequest($serverName, $serverBase, $location, $fileName, false, $statusCode);
|
|
|
|
}
|
|
|
|
}
|
2013-04-14 22:41:04 +00:00
|
|
|
}
|
|
|
|
return $statusCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check web interface location
|
|
|
|
function checkWebinterfaceLocation($location)
|
|
|
|
{
|
2013-05-01 20:16:05 +00:00
|
|
|
$locationLength = strlenu($this->yellow->config->get("webinterfaceLocation"));
|
|
|
|
$this->activeLocation = substru($location, 0, $locationLength) == $this->yellow->config->get("webinterfaceLocation");
|
2013-04-14 22:41:04 +00:00
|
|
|
return $this->isWebinterfaceLocation();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check user login
|
|
|
|
function checkUser()
|
|
|
|
{
|
|
|
|
if($_POST["action"] == "login")
|
|
|
|
{
|
2013-12-05 22:30:45 +00:00
|
|
|
$email = $_POST["email"];
|
2013-04-14 22:41:04 +00:00
|
|
|
$password = $_POST["password"];
|
|
|
|
if($this->users->checkUser($email, $password))
|
|
|
|
{
|
|
|
|
$this->users->createCookie("login", $email);
|
|
|
|
$this->activeUserEmail = $email;
|
|
|
|
} else {
|
|
|
|
$this->activeUserFail = true;
|
|
|
|
}
|
|
|
|
} else if(isset($_COOKIE["login"])) {
|
|
|
|
$cookie = $_COOKIE["login"];
|
|
|
|
if($this->users->checkCookie($cookie))
|
|
|
|
{
|
|
|
|
$this->activeUserEmail = $this->users->getCookieEmail($cookie);
|
|
|
|
} else {
|
|
|
|
$this->activeUserFail = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->isUser();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check users permissions for creating new page
|
|
|
|
function checkUserPermissions($location, $fileName)
|
|
|
|
{
|
|
|
|
$path = dirname($fileName);
|
2013-08-04 09:42:21 +00:00
|
|
|
return is_dir($path) && strlenu(basename($fileName))<128;
|
2013-04-14 22:41:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Check if web interface location
|
|
|
|
function isWebinterfaceLocation()
|
|
|
|
{
|
|
|
|
return $this->activeLocation;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check if user is logged in
|
|
|
|
function isUser()
|
|
|
|
{
|
|
|
|
return !empty($this->activeUserEmail);
|
|
|
|
}
|
|
|
|
|
2013-07-16 16:56:27 +00:00
|
|
|
// Return page tree with content information, two levels
|
2013-04-14 22:41:04 +00:00
|
|
|
function getPagesData()
|
|
|
|
{
|
|
|
|
$data = array();
|
2013-07-16 16:56:27 +00:00
|
|
|
foreach($this->yellow->pages->index(true, 2) as $page)
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
|
|
|
$data[$page->fileName] = array();
|
|
|
|
$data[$page->fileName]["location"] = $page->getLocation();
|
2013-05-01 20:16:05 +00:00
|
|
|
$data[$page->fileName]["modified"] = $page->getModified();
|
2013-09-17 09:18:01 +00:00
|
|
|
$data[$page->fileName]["title"] = $page->getHtml("title");
|
2013-04-14 22:41:04 +00:00
|
|
|
}
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return configuration data including user information
|
|
|
|
function getConfigData($email)
|
|
|
|
{
|
|
|
|
$data = array("userEmail" => $email,
|
|
|
|
"userName" => $this->users->getName($email),
|
|
|
|
"userLanguage" => $this->users->getLanguage($email),
|
2013-07-29 18:49:57 +00:00
|
|
|
"serverName" => $this->yellow->config->get("serverName"),
|
|
|
|
"serverBase" => $this->yellow->config->get("serverBase"));
|
2013-04-14 22:41:04 +00:00
|
|
|
return array_merge($data, $this->yellow->config->getData("Location"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Yellow web interface users
|
2013-12-01 11:59:07 +00:00
|
|
|
class YellowWebinterfaceUsers
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
2013-12-21 13:10:15 +00:00
|
|
|
var $yellow; //access to API
|
2013-04-14 22:41:04 +00:00
|
|
|
var $users; //registered users
|
|
|
|
|
2013-12-21 13:10:15 +00:00
|
|
|
function __construct($yellow)
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
2013-12-21 13:10:15 +00:00
|
|
|
$this->yellow = $yellow;
|
2013-04-14 22:41:04 +00:00
|
|
|
$this->users = array();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Load users from file
|
|
|
|
function load($fileName)
|
|
|
|
{
|
|
|
|
$fileData = @file($fileName);
|
|
|
|
if($fileData)
|
|
|
|
{
|
|
|
|
foreach($fileData as $line)
|
|
|
|
{
|
|
|
|
if(preg_match("/^\//", $line)) continue;
|
2013-05-01 20:16:05 +00:00
|
|
|
preg_match("/^(.*?),\s*(.*?),\s*(.*?),\s*(.*?)\s*$/", $line, $matches);
|
|
|
|
if(!empty($matches[1]) && !empty($matches[2]) && !empty($matches[3]) && !empty($matches[4]))
|
2013-04-14 22:41:04 +00:00
|
|
|
{
|
|
|
|
$this->setUser($matches[1], $matches[2], $matches[3], $matches[4]);
|
2013-12-01 11:59:07 +00:00
|
|
|
if(defined("DEBUG") && DEBUG>=3) echo "YellowWebinterfaceUsers::load email:$matches[1] $matches[3]<br/>\n";
|
2013-04-14 22:41:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-12-21 13:10:15 +00:00
|
|
|
|
|
|
|
// Create or update user in file
|
|
|
|
function createUser($fileName, $email, $password, $name, $language)
|
|
|
|
{
|
|
|
|
$email = strreplaceu(',', '-', $email);
|
|
|
|
$password = hash("sha256", $email.$password);
|
|
|
|
$fileNewUser = true;
|
|
|
|
$fileData = @file($fileName);
|
|
|
|
if($fileData)
|
|
|
|
{
|
|
|
|
foreach($fileData as $line)
|
|
|
|
{
|
|
|
|
preg_match("/^(.*?),\s*(.*?),\s*(.*?),\s*(.*?)\s*$/", $line, $matches);
|
|
|
|
if(!empty($matches[1]) && !empty($matches[2]) && !empty($matches[3]) && !empty($matches[4]))
|
|
|
|
{
|
|
|
|
if($matches[1] == $email)
|
|
|
|
{
|
|
|
|
$name = strreplaceu(',', '-', empty($name) ? $matches[3] : $name);
|
|
|
|
$language = strreplaceu(',', '-', empty($language) ? $matches[4] : $language);
|
|
|
|
$fileDataNew .= "$email,$password,$name,$language\n";
|
|
|
|
$fileNewUser = false;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$fileDataNew .= $line;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if($fileNewUser)
|
|
|
|
{
|
|
|
|
$name = strreplaceu(',', '-', empty($name) ? $this->yellow->config->get("sitename") : $name);
|
|
|
|
$language = strreplaceu(',', '-', empty($language) ? $this->yellow->config->get("language") : $language);
|
|
|
|
$fileDataNew .= "$email,$password,$name,$language\n";
|
|
|
|
}
|
|
|
|
return $this->yellow->toolbox->createFile($fileName, $fileDataNew);
|
|
|
|
}
|
2013-04-14 22:41:04 +00:00
|
|
|
|
|
|
|
// Set user data
|
|
|
|
function setUser($email, $password, $name, $language)
|
|
|
|
{
|
|
|
|
$this->users[$email] = array();
|
|
|
|
$this->users[$email]["email"] = $email;
|
|
|
|
$this->users[$email]["password"] = $password;
|
|
|
|
$this->users[$email]["name"] = $name;
|
|
|
|
$this->users[$email]["language"] = $language;
|
2013-05-01 20:16:05 +00:00
|
|
|
$this->users[$email]["session"] = hash("sha256", $email.$password.$password.$email);
|
2013-04-14 22:41:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Check user login
|
|
|
|
function checkUser($email, $password)
|
|
|
|
{
|
|
|
|
return $this->isExisting($email) && hash("sha256", $email.$password)==$this->users[$email]["password"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create browser cookie
|
|
|
|
function createCookie($cookieName, $email)
|
|
|
|
{
|
|
|
|
if($this->isExisting($email))
|
|
|
|
{
|
|
|
|
$salt = hash("sha256", uniqid(mt_rand(), true));
|
|
|
|
$text = $email.";".$salt.";".hash("sha256", $salt.$this->users[$email]["session"]);
|
2013-07-11 20:33:28 +00:00
|
|
|
setcookie($cookieName, $text, time()+60*60*24*30*365*10, "/");
|
2013-04-14 22:41:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Destroy browser cookie
|
|
|
|
function destroyCookie($cookieName)
|
|
|
|
{
|
|
|
|
setcookie($cookieName, "", time()-3600, "/");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check user login from browser cookie
|
|
|
|
function checkCookie($cookie)
|
|
|
|
{
|
2013-08-28 10:01:46 +00:00
|
|
|
list($email, $salt, $session) = explode(';', $cookie);
|
2013-04-14 22:41:04 +00:00
|
|
|
return $this->isExisting($email) && hash("sha256", $salt.$this->users[$email]["session"])==$session;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return user email from browser cookie
|
|
|
|
function getCookieEmail($cookie)
|
|
|
|
{
|
2013-08-28 10:01:46 +00:00
|
|
|
list($email, $salt, $session) = explode(';', $cookie);
|
2013-04-14 22:41:04 +00:00
|
|
|
return $email;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return user name
|
|
|
|
function getName($email)
|
|
|
|
{
|
|
|
|
return $this->isExisting($email) ? $this->users[$email]["name"] : "";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Return user language
|
|
|
|
function getLanguage($email)
|
|
|
|
{
|
|
|
|
return $this->isExisting($email) ? $this->users[$email]["language"] : "";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check if user exists
|
|
|
|
function isExisting($email)
|
|
|
|
{
|
|
|
|
return !is_null($this->users[$email]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-12-01 11:59:07 +00:00
|
|
|
$yellow->registerPlugin("webinterface", "YellowWebinterface", YellowWebinterface::Version);
|
2013-04-14 22:41:04 +00:00
|
|
|
?>
|