Location: PHPKode > projects > web-cp - Web Hosting Control Panel > webcp/server/lib/pop3.wcp.phps
<?	/*
	// File:	pop3.wcp.phps
	// Purpose:	POP3 user manipulation
	// Author:	Felix <hide@address.com>
	*/


// Handle user manipulation
if ($type == "user") {

	// Update User :: expect *
	if ($data['action'] == "update") {
		
		// if username changed, rename POP3 spool file
		if ($data['username'] != $data['username1']) {
			$oldpop3path = $cfg['mail_spool']."/".$data['username1'];
			$newpop3path = $cfg['mail_spool']."/".$data['username'];
			if (file_exists($oldpop3path))
				rename($oldpop3path,$newpop3path);
		}
	}
	
	// Remove User :: expect username
	if ($data['action'] == "remove") {

		// Remove POP3 spool file
		$pop3path = $cfg['mail_spool']."/".$data['username'];
		if (file_exists($pop3path) AND $data['username'])
			unlink($pop3path);
	}
}
?>
Return current item: web-cp - Web Hosting Control Panel