public static function create_pkis() { $key = file_get_contents(getenv('HOME') . '/.ssh/id_openssl.pub'); $user = User::find_by_username('bob'); Pki::create(array('key' => $key, 'name' => 'my Key', 'user_id' => $user->id)); }