Fix indenting. Remove use of $_SESSION[] inside of the class because we can simply use $this
This commit is contained in:
@@ -80,15 +80,15 @@ class User {
|
|||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$aInsert = compile_insert_string(array( 'realname' => $sRealname,
|
$aInsert = compile_insert_string(array( 'realname' => $sRealname,
|
||||||
'email' => $sEmail,
|
'email' => $sEmail,
|
||||||
'CVSrelease' => $sWineRelease ));
|
'CVSrelease' => $sWineRelease ));
|
||||||
|
|
||||||
$sFields = "({$aInsert['FIELDS']}, `password`, `stamp`, `created`)";
|
$sFields = "({$aInsert['FIELDS']}, `password`, `stamp`, `created`)";
|
||||||
$sValues = "({$aInsert['VALUES']}, password('".$sPassword."'), NOW(), NOW() )";
|
$sValues = "({$aInsert['VALUES']}, password('".$sPassword."'), NOW(), NOW() )";
|
||||||
|
|
||||||
query_appdb("INSERT INTO user_list $sFields VALUES $sValues", "Error while creating a new user.");
|
query_appdb("INSERT INTO user_list $sFields VALUES $sValues", "Error while creating a new user.");
|
||||||
return $this->login($sEmail, $sPassword);
|
return $this->login($sEmail, $sPassword);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -411,7 +411,7 @@ class User {
|
|||||||
$additionalTerms = "AND id='".$iAppDataId."'";
|
$additionalTerms = "AND id='".$iAppDataId."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_SESSION['current']->hasPriv("admin"))
|
if($this->hasPriv("admin"))
|
||||||
{
|
{
|
||||||
$sQuery = "SELECT ".$selectTerms."
|
$sQuery = "SELECT ".$selectTerms."
|
||||||
FROM appData,appVersion
|
FROM appData,appVersion
|
||||||
|
|||||||
Reference in New Issue
Block a user