Commit 65ededd3 authored by Celine Noirot's avatar Celine Noirot
Browse files

Improve installation

parent 4fc92f28
......@@ -1951,6 +1951,42 @@ class tx_nG6_db {
function delete_user($user_id){
$GLOBALS['TYPO3_DB']->exec_DELETEquery('fe_users', 'fe_users.uid='.$user_id);
}
/**
* finalize_installation : Update fe and be user from database
*
* @param string user_name the user id
* @return bool true if ok false else
*/
function finalize_installation($user_id, $user_name, $first_name, $last_name, $email, $password, $pid, $project, $descr){
$fe_user_datas = array(
'username' => $user_name,
'pid' => $pid,
'first_name' => $first_name,
'last_name' => $last_name,
'email' => $email,
'password' => $password,
'tstamp' => time()
);
$be_user_datas = array(
'username' => $user_name,
'realName' => $first_name. " ".$last_name,
'email' => $email,
'password' => $password,
'tstamp' => time()
);
$project_datas = array(
'name' => $project,
'description' => $descr
);
$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('fe_users', 'uid='.$user_id,$fe_user_datas );
if ($res == True){
$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery('be_users', 'uid='.$user_id,$be_user_datas );
}
return $res;
}
/**
* Count user in a group
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment