xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / inc / user / home-page.php (8f05d4e4dc31b161b6800251ad7e377438dfdd90) (1,156B) (mode 100644) [raw]
<?php
rg_log("FILE: /inc/user/home-page");

$_home = '';

$rg['page_ui'] = rg_user_info($db, 0, $user, "");
if (($rg['page_ui']['exists'] == 0)
	|| ($rg['page_ui']['suspended'] > 0)
	|| ($rg['page_ui']['deleted'] > 0)) {
	$_home .= rg_template("user/invalid.html", $rg, TRUE /*xss*/);
	return;
}

rg_watch_hl_process($db, $rg, 'user', $rg['page_ui']['uid'],
	0, $rg['current_url']);

$_home .= rg_template('user/home.html', $rg, TRUE /*xss*/);

// List of repositories
//$_home .= 'Repositories:';
$_home .= rg_repo_list($db, $rg, '', $rg['page_ui']['uid'], 0);


// hints
$hints = array();

if ($rg['page_ui']['uid'] == $rg['login_ui']['uid']) {
	if (empty($rg['login_ui']['email']))
		$hints[]['HTML:hint'] = rg_template('user/hints/empty_email.html',
			$rg, TRUE /*xss*/);
	else if ($rg['login_ui']['confirmed'] == 0)
		$hints[]['HTML:hint'] = rg_template('user/hints/econf.html',
			$rg, TRUE /*xss*/);

	$r = rg_totp_enrolled($db, $rg['login_ui']['uid']);
	if (($r['ok'] == 1) && ($r['enrolled'] == 0))
		$hints[]['HTML:hint'] = rg_template('user/hints/totp.html',
			$rg, TRUE /*xss*/);
}

$_home .= rg_template_table('hints/list', $hints, $rg);
?>
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master